node-dextrin - v0.1.0
    Preparing search index...

    Class export=

    DXN rational (int/uint) — an exact ratio, stored exactly as given and never silently reduced: 22/7 and 44/14 are distinct DXN values (DXN.md calls it "exact ratio," not "exact reduced ratio"), so reducing on parse/construction would be a silent, opinionated transformation. reduce() is offered but never called implicitly — mirrors Dextrin.Rational exactly.

    Index
    denominator: bigint
    dxnType: string
    numerator: bigint
    • Returns number

      lossy for numerator/denominator magnitudes beyond Number's safe range — documented, not hidden.

    • Exact, not approximate: every finite JS number is a binary fraction (mantissa × 2^exponent), so this decomposes it into an exact rational (a power-of-2 denominator) rather than approximating a decimal value the way DXNDecimal.fromNumber necessarily does.

      Parameters

      • n: number

      Returns export=