big_integer.js, that makes and performs operations on integers of any size. Since then, the ECMAScript standard has acquired a
BigInt type, which, being native, can run faster and consume less memory. I have revised
big_integer.js to use
BigInt as its underlying implementation.
I also created two other modules,
big_float.js module uses
big_integer.js to implement decimal floating point, similar to DEC64 but with virtually unlimited range and resolution. It benefits significantly from the
big_float.js module can exactly represent every value that binary floating point can, but binary floating point can not exactly represent
0.01. The world should stop using binary floating point.
big_rational.js module can exactly represent everything that
and can also exactly represent virtually all rational fractions, starting with
Rational arithmetic is truly awesome, but there is a potential problem: The numerators and denominators
can grow quickly in some computations, creating a big performance problem. So for most purposes,
decimal floating point suffices. But if you want to make the world's best, most accurate calculator,
nothing is better than big rationals.
I am also releasing the tests for those modules. The tests demonstrate the use of JSCheck.