#polyfill #float #math

no-std float-polyfills

Drop-in no_std-compatible polyfills for various f32 and f64 methods

1 unstable release

new 0.1.0 May 9, 2025

#147 in No standard library

MIT/Apache

11KB
205 lines

Float-polyfills

A Rust crate providing drop-in no_std-compatible polyfills for various f32 and f64 methods.

Supported methods

  • abs
  • acos
  • asin
  • atan
  • atan2
  • ceil
  • copysign
  • cos
  • exp
  • floor
  • hypot
  • ln
  • log2
  • log10
  • mul_add
  • powf
  • powi
  • recip
  • round
  • sin
  • sin_cos
  • sqrt
  • tan
  • trunc

Usage

Add polyfills to your no_std project:

use float_polyfills::*;

Alternative crates

License

License MIT License Apache 2.0

Float-polyfills is dual-licensed under Apache 2.0 and MIT terms.

Dependencies

~575KB
~12K SLoC