2 ms·
IEEE 754 defines bit exact results for a lot of FP operations, including denormals.
by gpderetta 8d ago
IEEE 754 defines bit exact results for a lot of FP operations, including denormals.
- applfanboysbgon 8d agoAnd yet floating point math in general is non-deterministic across different CPUs. IEEE 754 was not good enough, so it's a valid question.
- adrian_b 7d agoIt is non-deterministic mainly due to compilers that generate different code or when there are concurrent computations that are executed in an unpredictable order. A single sequence of floating-point operations executed on an IEEE 754 compliant CPU has always been perfectly deterministic since the first version of the standard. Who wants a deterministic computation must use a single-threaded program or a multi-threaded program where the order of execution is deterministic, and one must be careful so that changes in compiler versions or compilation options will not affect the type and order of the operations that are executed.