Bug in Excel 2007

E

Ed Hansberry, MS-MVP/Mobile Devices

Simon Murphy said:
Rough VBA code to test for potential problems posted here:

http://smurfonspreadsheets.wordpress.com/2007/09/25/excel-2007-calculation-bug-test-code/

compares .text to .value2
please chip in if you find an error or have an improvement

Unrunable. All ' and " marks have to be changed because your web
page changed them. :-(

Looks interesting though. Perhaps putting it in a .txt download.
cheers
Simon
--
__________________________________________________________________________________
Ed Hansberry (Please do *NOT* email me. Post here for the benefit of all)
What is on my Pocket PC? http://www.ehansberry.com/
Microsoft MVP - Mobile Devices www.pocketpc.com
What is an MVP? -
 
M

mwt

Simply when you try to multiply 850 by 77.1 excel display the result to be
100000 !!!

Try this
A B C D
5.1 12850 0 =($B$1*$A$1)+C1 --> 10000
1 =($B$1*$A$1)+C2 --> 10001
-1 =($B$1*$A$1)+C3 --> 65534
2 =($B$1*$A$1)+C4 --> 65537
 
E

Erwin Oosterhoorn

=5.1*12850 : 100000
=5.1*12850+1 : 100001
=5.1*12850+2 : 65537

but if you do
=5.1*12850+2-1 : 65536
=5.1*12850+2-2 : 65535
 
P

purpletravelgrrl

Simply when you try to multiply 850 by 77.1 excel display the result to be
100000 !!!

The interesting thing is that not every multiplier of 65535 provides
the 100000 answer. 4*16383.75 and 750*87.38 provided correct answers
and held up when running through the operations (+1 -1 etc) mentioned
earlier in the thread.
 
J

jmmarton

Simply when you try to multiply 850 by 77.1 excel display the result to be
100000 !!!

FYI, I do not experience this problem using OpenOffice Calc 2.1.
Entering this in a cell:

=850*77.1

correctly returns 65535.

Joe Marton
 
E

Ed Hansberry, MS-MVP/Mobile Devices

Simon Murphy said:
Thanks for the heads-up Ed
Link to .txt now added at bottom of that post.
http://smurfonspreadsheets.wordpress.com/2007/09/25/excel-2007-calculation-bug-test-code/

I tried this on a large worksheet and I get Error 6 (Overflow)

It was on formula 10,924 when it happened. It reported thousands
of errors, but that is because the worksheet is formatted to show
rounded thousands, so virtually everything was reported as an
error. I think you'll have to take a different approach than
trying to figure out what the formula result looks like.
cheers
Simon

"Ed Hansberry, MS-MVP/Mobile Devices"
--
__________________________________________________________________________________
Ed Hansberry (Please do *NOT* email me. Post here for the benefit of all)
What is on my Pocket PC? http://www.ehansberry.com/
Microsoft MVP - Mobile Devices www.pocketpc.com
What is an MVP? -
 
M

mattinger

Simply when you try to multiply 850 by 77.1 excel display the result to be
100000 !!!

65535 is also, coincidentally, the rather arbitrary limit on the # of
rows in an xls file
(has this changed with 2007?).
 
R

rronan.rsu

Simply when you try to multiply 850 by 77.1 excel display the result to be
100000 !!!

A very interesting "error" value in the cell is correct you just can
not see it:

It would appear that this defect is more an prank than an error.




850 77.1 100000
Charting and or simple math of cell "100000" below reveals the correct
number!
x2
850 77.70000 66045 1 132090
850 77.60000 65960 2 131920
850 77.50000 65875 3 131750
850 77.40000 65790 4 131580
850 77.30000 65705 5 131410
850 77.20000 65620 6 131240
850 77.10000 100000 7 131070
850 77.00000 65450 8 130900
850 76.90000 65365 9 130730
850 76.80000 65280 10 130560
850 76.70000 65195 11 130390
850 76.60000 65110 12 130220















Sneakiing up on the number works.

850 77.1 100000

+/- .00001
850 77.1000000000 65535.0000
850 77.09999 65534.9915
850 77.0999800000 65534.9830




850 77.1 100000

850 77.0999999999999000 65535
 
B

bobmon

Just to stick my oar in... I have a charming screencapture of Excel
2007 and Excel 2003 (and Solitaire, oops) both showing the same
spreadsheet. Wrong answer in 2007, right answer in 2003 (and in
OOo2.1).

Doesn't matter whether the .xls file is originally created in Excel
2007 or in Excel 2003.
 
J

JE McGimpsey

Um... No.

The number of rows in a .xls file (not a limit, all worksheets have
them) is 65536, not 65535.

It's not particularly arbitrary, either - 65536 is 2^16, or the maximum
integer it's possible to represent in two bytes.

Yes, the number of rows has changed in XL07.
 
E

Erich Neuwirth

=exp(ln(850*77.1)) returns 65535, and exp(ln(A1)) also returns 65535 if
A1 contains =850*77.1

This is a very strong indication that the whole thing is a rendering
issue. There are other major issues with rendering: the Data Table
mechanism sometimes does not display the correct result, but the result
"one step earlier". Just scrolling down and up will change the displayed
value to the the correct result.
 
N

nollaigoc

Excel uses the FPU for INTERMEDIATE calculations, but the final value
of any cell formula gets passed through some, er, MSFT value-added
processing before it becomes the cell's value. This is how
nonparenthesized expressions are implicitly rounded to 15 decimal
digits. Also, and quite unfortunately, some built-in function calls
perform additional and usually unnecessary postprocessing of FPU
results, e.g., MOD(2^30-1,3), which returns #NUM! because MOD can't
handle arguments that produce quotients comfortably within 32-bit
integer or 64-bit double precision bounds even though this is well
within the FPU's capabilities.

I don't think this is the case for 850*77.1. I suspect some bright
spark on the Excel development team decided to rewrite their machine
representation-to-human representation internal number formatting
function, and they screwed it up somehow.

What really concerns me is what Dana DeLouis pointed out: with A1
containing =850*77.1, =A1+1 returns 100001 while =A1-1 returns 65534.
That's VERY, VERY BAD because it implies the value in A1 isn't just
fed directly to the FPU stack. It's subjected to, er, value-added
preprocessing which seems to differ depending on what the precise
operation is. What I'm most worried about, given Dana's other
examples, is whether someone thought they were doing Excel users a
favor by treating increment (+1), decrement (-1), idempotent
operations (+0, *1, ^1), binary left shift (*2) and binary right shift
(/2) as special cases in the formula parser. MSFT *DID* rewrite parts
of the formula parser in XL2007, which is how they lifted the 7 nested
function call limit etc. I'd bet they rewrote too much of it.



Presumably "Render like Excel 2007" will appear soon as a feature
like the leap year in Microsoft 1900 date calculation scheme in Excel.
Microsoft QA program has been subverted by the 6000 page OOXML
specification. There are lots of unique features in that spec also.
Desktop monopoly subverts number system natural monopoly!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top