def get_pow1000(num):
    """Determine exponent for which significand of a number is within the
    range [1, 1000).
    """
    from decimal import Decimal
    from math import floor
    dnum = Decimal(str(num))
    if dnum == 0:
        return 0
    elif dnum < 0:
        dnum = -dnum
    return int(floor(dnum.log10() / 3))
