import math


def to_relevant_precision(decimal):
    """
    Get relevant precision of a decimal number.

    :param decimal: a floating point number.
    :return: a tuple of a and n such that: decimal = a * 10^(-b).
    """
    if decimal == 0:
        return 0, 0
    precision = 0
    abs_a = math.fabs(decimal)
    while abs_a < 1.0:
        abs_a *= 10
        precision += 1
    if decimal < 0:
        return -abs_a, precision
    return abs_a, precision