Repository navigation
APN Mojo 1.0.0
The first release of APN Mojo: arbitrary-precision numbers for Mojo 1.1, in pure Mojo with no runtime dependency on GMP, MPFR, MPC or Python.
- Exact numbers:
IntegerandRationalof any size, with bit operations, roots, modular arithmetic, primality tests, factorials and binomials, andExactComplexwith rational parts. - Correctly rounded floating point:
FloatandComplexat any precision and exponent range, each result rounded once in any of five rounding modes, with traps per call. Elementary and special functions (gamma, zeta, error functions, Lambert W, hypergeometric functions and more) are correctly rounded too. - Guaranteed bounds:
BallandComplexBallmidpoint-radius arithmetic that carries input uncertainty and rounding error, with set operations and certified conversion to rounded values. - Arrays:
Batch[T]for every number type, with views, masks, broadcasting, NumPy-stylebatch.*functions and reductions,vmapandliftto map scalar functions over arrays, and multithreaded evaluation. - Interchange: decimal, hexadecimal and binary text, format-preserving JSON, and conversion to and from native Mojo numbers.
Works with Mojo 1.1.x on Linux x86-64 and macOS arm64.
Install: the Modular community channel carries APN Mojo 1.0.1 instead of this version; its notes show how to install it.
Documentation: https://spellbound-mojo.github.io/apn_mojo/