(Disclaimer: I'm not associated with IEEE 754)
Prioritizes being correct and readable over performance. Built on top of algebraics, the algebraic numbers library that I also wrote.
Supports emulating all platforms without changing compile-time configuration options (unlike Berkeley SoftFloat).
Allows big-int based floats -- can make
f65536 if desired! (though it will be very slow for big numbers)
Caveat: currently doesn't completely handle NaN payload propagation, however should be 100% bit-level accurate on RISC-V where NaN payload propagation isn't needed.
Tested against Berkeley SoftFloat, the de-facto industry-standard reference implementation of IEEE 754.
Source on Debian Salsa (also mirrored on GitHub):
- custom types (not thoroughly tested, all IEEE754 standard interchange types should be bug-free except for NaN payload propagation)
DynamicFloat(dynamically adjustable type, big-int based)
- Add, Sub, Mul, Div, Sqrt, fused mul-add
- Quiet/Signaling Compare
- Integer <-> Float conversions
- Float <-> Float conversions
- sign manipulation (neg, abs, copy_sign, direct sign access)
- reciprocal square-root
1 / sqrt(x)-- not supported on Berkeley SoftFloat
- many more (implements all IEEE 754-2019 required operations)
- Power ISA
- x86 SSE/AVX
- MIPS 2008 revision
- MIPS pre-2008 revision