Skip to content

APN Mojo 1.0.0

Choose a tag to compare

@anatolvitold anatolvitold released this 07 Oct 01:25
· 5 commits to main since this release

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: Integer and Rational of any size, with bit operations, roots, modular arithmetic, primality tests, factorials and binomials, and ExactComplex with rational parts.
  • Correctly rounded floating point: Float and Complex at 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: Ball and ComplexBall midpoint-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-style batch.* functions and reductions, vmap and lift to 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/