3 ms·
The issue is that the representation of floating point numbers imposes additional cognitive burden that the code must handle. How does the web server header par
by mattgreenrocks 6y ago
The issue is that the representation of floating point numbers imposes additional cognitive burden that the code must handle. How does the web server header parsing code handle positive/negative infinity? How about NaN?
NaNs/infs are particularly vicious, as they propagate through computations.
- rsj_hn 6y agoThis. Floating point numbers, as they are lossy attempts to discretize continuous data, are more complex and usually non-deterministic. They should never be chosen when a non-lossy representation is available for the problem domain.
- OneWingedShark 6y agolaughs in Ada -- IEEE754/64-bits: Interfaces.IEEE_Float_64 -- And here we strip out non-numeric values. Use Interfaces; Subtype Numeric_Real is IEEE_Float_64 range IEEE_Float_64'Range; Done.