MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / decimalExponent

Function decimalExponent

src/big-decimal/transcendentals.ts:197–199  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

195 * in the working precision) before crossing the bridge.
196 */
197function 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)

Callers 1

transcendentals.tsFile · 0.85

Calls 1

digitCountMethod · 0.80

Tested by

no test coverage detected