Crate m [] [src]

A C free / pure Rust mathematical library ("libm") for no_std code

This is a port of OpenLibm.


Currently, this crate only provides a Float extension trait that's very similar to the one in std but its method are implemented in pure Rust instead of its methods being wrappers over the system libm. For this reason, this trait is usable in C free, no_std environments.


use m::Float as _0;

fn foo(x: f32) -> f32 {

Mind you that, at the moment, this extension trait only provides a handful of mathematical functions -- only the ones that have been ported to Rust.


So far, these functions have been ported to Rust:

  • atan2f
  • atanf
  • fabs
  • fabsf



Trait that provides mathematical functions for floating point numbers