Berkeley SoftFloat by John Hauser is a C library, that implements IEEE-754. The source is primarily distributed as archives and is seemingly maintained on GitHub.
Berkeley TestFloat tests IEEE-compliance. Berkeley HardFloat provides Verilog implementations.
Bindings and libraries:
Forks:
APFloat
llvm::APFloat
is a C++ data type in LLVM, that implements arbitrary-precision
floats with various semantics. The sources are at
llvm/include/llvm/ADT/APFloat.h
,
llvm/unittests/ADT/APFloatTest.cpp
,
and llvm/lib/Support/APFloat.cpp
.
rustc_apfloat
is a port of it to
Rust, used in rustc and Cranelift.
ieee-apsqrt
extends
rustc_apfloat
with square root.
GNU MPFR is a C library for floating-point computations with arbitrary precision, which is set on construction.
Rug for Rust wraps MPFR with Float
.
…
libm is a C math library for machines that support IEEE-754 binary64. Is has several implementations.
Go uses a softfloat implementation by default for ARMv5, and it can be enabled for MIPS (since Go 1.10 [issue]), 386 (since Go 1.16 [issue]), and ARM (since Go 1.22 [issue]).
simple-soft-float is a straightforward reference implementation of IEEE-754 in Rust. It looks to be a great reference and has excellent tests. [crates.io]
half
) implements
IEEE 754-2008 binary16
, as well bfloat16
, in Rust.
[crates.io]Float
, in Rust using Ramp.rustc_apfloat
,
softfp, and panicking.Float
Fully list libraries from this thread.