Software implementations of operations on IEEE 754 floating point numbers in Rust.
The implementations are not optimised to use any. The code is supposed to be very well documented (as if!) so one could learn from it.
This library is indended to be used with Rust programs on targets where libm is not available or linking to it is undesirable. It does not provide 1-to-1 feature parity with libm. Namely:
- Any global state is not updated or used (this includes errors, rounding direction etc);
- Several functions are omitted. Currently:
- nan, nanf – reliance on libc functions;
- Functions that take or return
long doubleis usually not a standard IEEE 754 type.
In order to use this library nothing special needs to be done. Use regular functions from the
core and simply link to this library. In case the target platform has no hardware
support for some operation, software implementations provided by this library will be used