def dps_to_prec(n):
    return max(1, int(round((int(n)+1)*3.3219280948873626)))
Return the number of bits required to represent n decimals
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/libmp/libmpf.py/dps_to_prec