Accumath

Open source

zenith-bound

Guaranteed error bounds for every answer, computed in pure Rust. Free and open source, built by the Accumath team for the community.

About

Interval (ball) arithmetic with rigorous error bounds, built on zenith-float. Every result carries a proven enclosure: a midpoint and a radius, where the true value is guaranteed to lie within midpoint ± radius. No guessing, no heuristic estimates — a mathematical proof that the answer is correct to the stated precision.

Current version 0.1.0 (in development) · License MIT OR Apache-2.0

A ball is {mid: ExactNum, rad: Mag, prec: u32}. Mid is the best estimate, computed with zenith-float's correctly-rounded arithmetic. Rad is the error radius, always rounded up, so the enclosure is guaranteed. Mag is a 64-bit mantissa with an i64 exponent, always rounded up. The crate is #![forbid(unsafe_code)], no IEEE floats, no C dependencies. Ports puremp (MIT) with credit.

Source on GitHub

Built and tested (1–12)

L0 is committed, with 20,954 mpmath goldens. The wide-range suite is 78 tests, which caught 5 of 6 planted bugs (the 6th was an equivalent mutant). An item is listed here only when it is built, has tests, and those tests pass.

  1. 1Ball type: midpoint + radius, with precision tracking
  2. 2Mag type: 64-bit mantissa + i64 exponent, always rounded up
  3. 3Add, subtract, multiply, divide with guaranteed enclosures
  4. 4Square root, exponential, logarithm with rigorous bounds
  5. 5Trigonometric functions with correct enclosures
  6. 6Directed rounding: all operations respect the rounding mode
  7. 7Precision propagation: radius grows correctly through operation chains
  8. 8CONTRACT.md: formal specification written before any magnitude code
  9. 920,954 mpmath goldens for verification
  10. 10Wide-range testing: 78 tests covering edge cases and planted bugs
  11. 11Shared test harness with zenith-float (Harper's branch)
  12. 12Scans on every commit: no clones, no unsafe, no IEEE floats

Still to build (13–18)

  1. 13L1: Elementary functions (full set with rigorous bounds)
  2. 14L2: Special functions (gamma, Bessel, erf with enclosures)
  3. 15L3: Linear algebra (matrix operations with guaranteed bounds)
  4. 16L4: Quadrature and ODE solvers with rigorous error bounds
  5. 17Integration with Accumath: every Accumath result carries a zenith-bound enclosure
  6. 18Publication to crates.io (currently in development, not yet published)

All open-source projects Buy a pre-release Accumath license — $25+