fpmath 0.1.1

A floating point math library
Documentation
  • Coverage
  • 100%
    112 out of 112 items documented0 out of 109 items with examples
  • Size
  • Source code size: 335.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 10.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • eduardosm/rust-fpmath
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • eduardosm

fpmath

GitHub Actions Status crates.io Documentation MSRV License

fpmath is a pure-Rust floating point library that implements math functions for f32 and f64.

Features

  • Less than 1 ULP error in most functions.
  • f32 versions do not internally use f64 arithmetic.
  • All functions are also implemented for soft-float single-precision and double precision.
  • no_std
  • All functions are tested for accuracy (MPFR is used to calculate reference values).
  • The included generator crate can generate all magic constants used in the algorithms.

Included functions

  • Absolute value
  • Copy sign
  • Rounding (to nearest, towards zero, towards infinity, towards negative infinity)
  • Exponential in base e, 2 and 10
  • Logarithm in base e, 2 and 10
  • Trigonometric (sine, cosine, tangent) in radians, degrees and half-revolutions
  • Inverse trigonometric (arcsine, arccosine, arctangent) in radians, degrees and half-revolutions
  • Hyperbolic (sine, cosine, tangent)
  • Inverse hyperbolic (arcsine, arccosine, arctangent)
  • Square and cube root
  • Hypotenuse
  • Power (floating point and integer exponent)

License

Licensed under either of

at your option.