Excel 2007 Multiplication Bug
Apparently, any time Excel 2007 calculates a formula that results in 65,535, it displays another number. Often, it’s 100,000. Sometimes it’s something else. Slashdot has a story on the Excel bug, and microsoft.public.excel on Usenet has the original post and confirmation.
Some choice comments from the Slashdot discussion:
It is nice to see that since this is a free and open standard that the bug has been identified quickly and fixed.
Oh wait, it isn’t and the bug is still at large. Sorry, jumped the gun there due to the speed at which the Open Source community usually fixes issues like this. Maybe ISO should take note.
Note: this bug has been public since at least September 22, 2007.
Microsoft already has a patch in the works to help users overcome this issue. Whenever the user types a ‘*’ in a formula, an animated sprite of Charles Babbage’s head will pop up. It will show this bubble caption:“It looks like you’re trying to multiply two numbers. I can help show you how to use the Method of Finite Differences to find a good approximation of your answer using only addition and subtraction. Would you like me to bring up a wizard so that we can get started on finding an appropriate power series?”
Babby?
Perhaps this is how multiplication is done in OOXML. They do leap years in dates wrong, too.
“It’s just a different perspective on life, man.”
It sounds like they are doing small-number math in one representation (perhaps they use short fixed-width decimal representations) and then switching to another method (arbitrary length decimal numbers?) at the binary-inspired boundary 2^16…but somehow they got it mixed up with a different decimal boundary in the edge case.Clearly the error is weirdly subtle, if 5.1*12850 gives the bugged behavior, but 8.5*7710 works just fine. In fact, I verified that all permutations of a bugged combination =A*B of the form =A/2*B*2 are bugged. Further…all of the buggy decimal values have no perfect floating point binary representation. 77.1 has an infinite binary expansion using IEE 754, while 8.5 has an exact representation. It seems likely that they are only using their BCD format (or whatever) when binary floating (or fixed) point just won’t cut it, but then their internal->decimal conversion code chokes on 2^16 for some reason, while the binary (whether it is floating or fixed point) conversion works just fine (possibly because it doesn’t have a boundary at 2^16–maybe it has its own threshold bugs ;p).
I wouldn’t really know about the bug or be able to test it: No Excel of any version in this house.


Dave:
Yay for Google Docs Spreadsheet! Oh… ya, that has bugs too (mentioned in that discussion) :/
26 September 2007, 10:40 am