FixMath
FixMath is a software library and specification for fixed-point mathematics designed to provide deterministic, portable numeric computations across diverse hardware. It defines fixed-point numeric types with configurable word length and fractional bits, along with arithmetic operations, conversions, and utilities to support predictable behavior in embedded and real-time systems.
Originating in the early 2010s as a response to nondeterministic floating-point behavior in simulations and control
Core features include saturating and wrapping arithmetic, explicit scale management, overflow detection, status flags, and SIMD-accelerated
Math functions include fixed-point implementations of sqrt, abs, min/max, and select transcendental functions (sin, cos, exp,
Implementation spans core libraries in C, C++, Rust, and Python bindings, with reference implementations and porting
Typical applications include embedded control loops, digital signal processing pipelines, and safety-critical systems where reproducibility matters,
Critics note that fixed-point configuration can be complex and error-prone if precision is mis-specified, and performance
See also: Fixed-point arithmetic, Deterministic computing, Numerical libraries.