Skip to content

Curated list of Rust floating point crates and utilities.

Notifications You must be signed in to change notification settings

nestordemeure/awesome-rust-floats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Awesome Rust floats

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.

Improved precision

  • 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)

Float comparison

  • 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

Generic code

  • Num traits, traits to implement numerical code generic over types and new numeric types
  • Numeric literals, macro to convert literals into a type

Correctness

  • 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)

IEEE-754 specific operations

  • 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)

Alternative numeric types

  • 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)

Intervals arithmetic

  • 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)

fixed point numbers

About

Curated list of Rust floating point crates and utilities.

Topics

Resources

Stars

Watchers

Forks