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

Function firstDigits

test/big-decimal/ln-agm.test.ts:26–28  ·  view source on GitHub ↗
(x: BigDecimal, n: number)

Source from the content-addressed store, hash-verified

24}
25
26function firstDigits(x: BigDecimal, n: number): string {
27 return x.toPrecision(n).toString();
28}
29
30describe('AGM logarithm (high precision)', () => {
31 // p = 12100 is inside the AGM window (≥ 12040 digits, i.e. ≥ LN_AGM_MIN_BITS

Callers 1

ln-agm.test.tsFile · 0.85

Calls 2

toPrecisionMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected