Excel 2007 Multiplication Bug 806
tibbar66 writes with news of a serious multiplication bug in Excel 2007, which has been reported to the company. The example that first came to light is =850*77.1 — which gives a result of 100,000 instead of the correct 65,535. It seems that any formula that should evaluate to 65,535 will act strangely. One poster in the forum noted these behaviors: "Suppose the formula is in A1. =A1+1 returns 100,001, which appears to show the formula is in fact 100,000... =A1*2 returns 131,070, as if A1 had 65,535 (which it should have been). =A1*1 keeps it at 100,000. =A1-1 returns 65,534. =A1/1 is still 100,000. =A1/2 returns 32767.5."
Google Spreadsheet bug (Score:4, Interesting)
Microsoft Excel is the Worst Part of Office 2007 (Score:3, Interesting)
I use the Office 2007 versions of Word, Excel, and OneNote on a regular basis for my Windows business work; the *only* one I've had *any* trouble with is Excel. I can blue screen my machines with Excel on a regular basis; unfortunately, one of my paying customers requires Excel 2007 because they invested heavily in it (long before I was contracted), so I haven't got much choice, since .xlsx documents won't open in any FOSS spreadsheet apps.
For my personal work, I use Gnumeric on Linux.
some limited testing (Score:5, Interesting)
425 154.2 100000
212.5 308.4 100000
8500 7.71 100000
but this evaluates correctly..
25 2621.4 65535
so it's not every multiplication that evaluates to 65535
I'm using Excel 2007 12.0.6024.5000
Imperiled by binary decimals? (Score:5, Interesting)
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
Not the only devastating bug (Score:4, Interesting)
If you type in 3.5 you will get "3. Mai". Now if you try to correct yourself by entering 3,5, the correct way to enter decimals in german, you will get "3. Januar". There just is no way for the unexperienced user to get back to normal.
The bug essentially is that the system allows dates without a year.
Re:In OOXML? (Score:3, Interesting)
Oblig. (Score:1, Interesting)
Re:Good Luck! (Score:3, Interesting)
That's a good point. Has someone with Excel 2007 tested whether a similar bug comes up with (2^32)-1?
Re:Special powers (Score:4, Interesting)
Try an install of the Visual Studio
Looks like a typo (Score:5, Interesting)
Someone was slacking in the testing department.
Re:Microsoft just announced plans for their fix (Score:2, Interesting)
MS Multiplan on Commodore 64 (Score:4, Interesting)
I have always been under the impression that Excel was originally based on MS Multiplan (isn't it?) so the code was correct at that time and has become broken at some subsequent point.
Re:Is anyone using Excel 2007? (Score:4, Interesting)
I started with Excel 2.0*, in those days every release seemed to add significant new features (and floppies) and there was always a rush to install the new version and some excitement as you discovered the new features. By Excel '97 the program was so feature rich that most users never used more than a fraction of its functionality, same goes for Word '97. Where do you go from there?
(OOXML etc, I know).
*I think it was 2.0, it was 20 years ago.
basic math errors in MS libs? Nothing new.. (Score:5, Interesting)
Back in the 386 days, the tan() function returned the wrong sgn if no coprocessor was present. Contacted and confirmed the error they simply ignored such a basic issue, and replied with 'use sin() and cos() functions instead'. Great.
It seems old habits never die!
Re:I have another theory entirely. (Score:4, Interesting)
As Harlan Grove pointed out in the thread, [google.com] some functions may be taking the value from the .Text property rather than the .Value property. Most things see the correct value despite it being misdisplayed.
Why would they do something goofy like that? I have no idea, and I don't have an easy way to check off-hand, at least not in Excel 2007.
Re:Microsoft just announced plans for their fix (Score:2, Interesting)
Re:In OOXML? (Score:1, Interesting)
They DO pay you to find bugs .. (Score:5, Interesting)
Bug finding is a valuable contribution to the value of any product. My current testing policy is to find the biggest pain in the ass in my user community - whoever has the largest bug count from the previous release. And give them the first beta. Every bug squashed improves the product for everyone. The cumulative value can't be ignored.
If you find bugs in any software, it's in your interest to report them, because you obviously want them fixed. If it's a commercial product, you may even be able to get more instant satisfaction. OTOH, for open-source products, I've had an instance where I was able to saunter into an IRC channel, mention a particular bug, and have the lead developer upload a new version to my server within 10 minutes, because he recognised the value of having a technically able user put his product through heavy stress.
Don't just swear and cuss about bugs in OpenOffice. Report them, send them copies of the files that break it. You might get your bug fixed. For free, in the next version. When did you last get that sort of deal from Microsoft?
Re:please dig this story and get it to the masses (Score:2, Interesting)
Re:In OOXML? (Score:4, Interesting)
I was surprised to find that the error actually had came up much earlier, but when the difference between cells is less than a certain amount, excel's equality resolves as true. So removing the last few entries, the book balanced again, even though the difference was now -2.18E-19. Clearly they are aware of this problem and are trying to hide it. If it was not actively fudging numbers there would probably be a lot more people having numerical problems. (numbers cited here are illustrations, I do not recall the exact values or precision)
Re:please dig this story and get it to the masses (Score:2, Interesting)
+44 diggs by trib4lmaniac 3 hours ago
Of interest is the fact that 65,535 is the largest number that can represented by an unsigned, 16 bit integer (i.e. 0xFFFF).
After a little experimentation in VBA, I have found that 100000 is only returned when accessing the cells "Text" property. When asking for the cells "Value" 65,535 is returned as expected.
I created a quick macro to test this after filling cell A1 with the formula "=850*77.1"
MsgBox (Range("A1").Text) => Alerts 100000
MsgBox (Range("A1").Value) => Alerts 65535
Re:In OOXML? (Score:2, Interesting)
Yes. Spreadsheet applications use floating point arithmetic, and are thus inappropriate for accounting. Does nobody go to school anymore? What is the entire damned world thinking?
Surely your (hopefully government mandated) accounting procedures tell you to do your calculations in cents, or mils, or something, do they not? Then, I would think, you should follow those procedures. You really should. Even if Excel is (a) sold by Microsoft and (b) pretty convenient.
Or is it me that's insane?
(A quick check at Wikipedia tells me, for example, that the US Coinage act of 1792 said "That the money of account of the United States shall be expressed in dollars or units, dismes or tenths, cents or hundredths, and milles or thousandths, a disme being the tenth part of a dollar, a cent the hundredth part of a dollar, a mille the thousandth part of a dollar, and that all accounts in the public offices and all proceedings in the courts of the United States shall be kept and had in conformity to this regulation." Have these sorts of regulations really all been overturned?)