exactnumber
Version:
Arbitrary-precision decimals. Enables making math calculations with rational numbers, without precision loss.
11 lines (10 loc) • 327 B
TypeScript
import type { ExactNumberType } from '../types';
import { FixedNumber } from '../FixedNumber';
export declare class ConstantCache {
private fn;
private max;
private cachedDecimals;
private cache;
constructor(fn: (decimals: number) => ExactNumberType, max: number);
get(decimals: number): FixedNumber;
}