Fixed-point arithmetic Created 2026-10-20 Updated 2026-11-05
Fixed-point arithmetic represents values as integer multiples of a fixed scale . Integer operations on , followed by the required rescaling and rounding, implement arithmetic on these values. Unlike floating-point arithmetic, the spacing is constant throughout the representable range.
For , the stored integer represents . Multiplying two encoded values and gives , so returning to the original scale requires dividing the integer product by with a stated rounding rule. Fixed spacing makes resolution predictable, but the chosen integer width limits range and can cause integer overflow.