* Decimal exponent of a finite, non-zero value: |x| ∈ [10^e, 10^(e+1)). * * The fixed-point bridge (`toFixedPoint`) is an *absolute*-precision grid: * values below 10^-workingPrec truncate to 0n and values far from 1 lose * leading digits. Every transcendental that wants full *relative* precisio
(x: BigDecimal)
| 195 | * in the working precision) before crossing the bridge. |
| 196 | */ |
| 197 | function decimalExponent(x: BigDecimal): number { |
| 198 | return x.exponent + x._digitCount() - 1; |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Number of leading decimal digits lost to cancellation for an O(1) |
no test coverage detected