4 ms·
My money (but not a lot of it) is on Microsoft Excel. Its number arithmetic is, let’s say, special. Microsoft claims they use IEEE 754 floats (https://learn.mi
by Someone 4y ago
My money (but not a lot of it) is on Microsoft Excel. Its number arithmetic is, let’s say, special.
Microsoft claims they use IEEE 754 floats (https://learn.microsoft.com/en-us/office/troubleshoot/excel/floating-point-arithmetic-inaccurate-result https://learn.microsoft.com/en-us/office/troubleshoot/excel/...), but they don’t completely do that.
For example, do
A1: 0.3
A2: 0.2
A3: 0.1
A4: =A1-A2-A3
A5: =(A1-A2-A3)
B4: =A4=0
B5: =A5=0
A4 will show as “0”, A5 as “-2.77556E-17”, and B4 and B5 show these aren’t purely display issues. B4 shows “TRUE”, B5 shows “FALSE”.
My hunch is that they sometimes use BCD arithmetic.
More info at http://people.eecs.berkeley.edu/~wkahan/ARITH_17.pdf http://people.eecs.berkeley.edu/~wkahan/ARITH_17.pdf.
- jonhohle 4y agoIs `B5: =_A6_=0` intentional or should it be A5?
- Someone 4y agoTypo. Sorry. Fixed. Thanks.
- lobochrome 4y agoYou are shaking my foundations here. I frequently, when writing complicated formulas, leave in a set of parentheses too much, just because when writing the formula, I wasn't sure yet whether I'd need them. Bill - j'accuse!
- ezfe 4y agoiWork/Numbers does this properly, and repost 0/0/TRUE/TRUE in each case
- ilyt 4y agodefine "properly". It should be false/false for the IEEE floats...
- wmf 4y agoSpreadsheets should probably use decimal not IEEE 754.
- vba616 4y agoI don't know anything about the topic, but there may be decimal standards that are part of IEEE 754? https://en.wikipedia.org/wiki/Decimal64_floating-point_format https://en.wikipedia.org/wiki/Decimal64_floating-point_forma... "formally introduced in the 2008 version of IEEE 754 as well as with ISO/IEC/IEEE 60559:2011."
- kccqzy 4y agoApple has clearly said that they don't use regular floats. https://web.archive.org/web/20190629181619/https://support.apple.com/en-us/HT210179 https://web.archive.org/web/20190629181619/https://support.a...