This is a curated list of libraries and utilities to manipulate floating-point (and real numbers in general) in the Rust programming language. Mostly a list of crates I find interesting.
- Accurate, implement exact (no round-off) and compensated (improved precision) sum and dot product algorithms plus accumulators
- Rug, arbitrary precision numbers with correct rounding (GMP, MPFR bindings)
- Ramp, high performance arbitrary precision int and rationals (floats are in their TODO)
- Two-float, double double arithmetic (roughly doubled precision)
- Approx, compare floats with absolute or relative values (designed for test suites)
- Float-comp, compare float in absolute value or number or ULP
- Ordered float, wrapper for floats that makes them ordered and hashable
- Num traits, traits to implement numerical code generic over types and new numeric types
- Numeric literals, macro to convert literals into a type
- Uom, numbers that encode units of measurement
- Noisy float, floats that panic when they become Nan
- Herbie lint for rust, warning on numericaly unstable mathematical expression (Not functional anymore)
- IEEE754, low level float operations (such as getting the next representable float)
- Safe EFT, error free transformations (fucntions that can extract the numerical error produced by an operation)
- Num, collection of numeric types (and traits) including rationals and complex numbers
- Algebraics, algebraic number (slow but exact operations)
- SoftPosit, posit numbers (alternative to IEEE-754 arithmetic)
- Half, 16 bit float (storage only, no operator provided)
- Intervallum, interval operations (does not seem to take round-offs into account)
- Honest intervals, interval operations (does take round-offs into account)
- efloat, keep track of an upper ad lower bound on the numbers (meant to be used as a check on precision)
- Rust_decimal, viable for finance
- Bigdecimal, arbitrary precision
- Fixed, basic formats (no algebraic functions)