logoalt Hacker News

gregates • today at 8:43 AM • 1 reply • view on HN

Funny thing about spreadsheets is that, if you want to be Excel-compatible, IEEE 754 isn't sufficient. Excel worries a lot about making floating point numbers feel like real numbers to non computer scientists, to the extent that it sacrifices precision to achieve the property that the digits you type might by truncated, but they'll never be rounded to a non-zero digit. And many Excel features work on numbers as displayed, rather than the underlying bytes. Numeric identity isn't bit-equivalence, in Excel (e.g., 0.3 == 0.1 + 0.2). And order isn't even transitive, for some applications (like filters).

It's very easy to make a spreadsheet that adds binary64 numbers faster than Excel.


Replies

Someone • today at 9:38 AM

IEEE 754 isn't sufficient. Excel worries a lot about making floating point numbers feel like real numbers to non computer scientists

William Kahan, father of IEEE 754, wrote about that: https://people.eecs.berkeley.edu/~wkahan/Mind1ess.pdf

> And many Excel features work on numbers as displayed, rather than the underlying bytes.

I think that’s a configuration flag