pg_utils.numerics.utils.transform_dps_prec

pg_utils.numerics.utils.transform_dps_prec(dps: Optional[int] = None, prec: Optional[int] = None, dps_default: int = 16, prec_default: int = 53) ndarray[source]

Conversion between decimal points and precision

The current implementation seems to be consistent with the dps-precision conversion in sympy, mpmath and gmpy2. Currently, 3.322 is used as a proxy for \(\log_2(10)\), this value seems accurate enough.