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

Function highPrecRef

test/big-decimal/comprehensive-benchmark.ts:353–359  ·  view source on GitHub ↗
(fn: (d: typeof Decimal) => string)

Source from the content-addressed store, hash-verified

351
352// Compute reference values at very high precision (1000 digits)
353function highPrecRef(fn: (d: typeof Decimal) => string): string {
354 const saved = Decimal.precision;
355 Decimal.set({ precision: 1000 });
356 const result = fn(Decimal);
357 Decimal.set({ precision: saved });
358 return result;
359}
360
361const REFS: Record<string, string> = {
362 'e': highPrecRef((D) => D.exp(1).toString()),

Callers 1

Calls 2

fnFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected