INT defect: Please try this on 2007 for me
"Ron Rosenfeld" wrote:
Here is what I get in Excel 2007 SP2 (results formatted as General)
=INT(123456789 - 0.0000004) -- 123456789
=A1-INT(A1) -- 0
Given the first result, the second result is a surprise.
I wonder if Excel 2007 changed the behavior of General format.
Try formatting at least the A1-INT(A1) cell lwith Scientific format with 14
decimal places.
Alternatively, Excel 2007 might have changed the way 123456789 - 0.0000004
behaves (yikes!). Unfortunately, there is no way to see that with normal
formatting.
If you would be willing to use my macros for formatting beyond 15 sig
digits, send me email at joeu2004 "at" hotmail.com.
----- original message -----
"Ron Rosenfeld" wrote in message
...
On Sat, 10 Oct 2009 01:19:54 -0700, "JoeU2004"
wrote:
Has the following Excel 2003 problem been fixed in 2010 (or 2007)?
INT(123456789 - 0.0000004) returns 123456789 instead of 123456788.
This causes a problem in formulas like the following: if A1 is
=123456789-0.0000004, =A1-INT(A1) is negative unexpectedly,
about -4.917E-07
when formatted as General.
Here is what I get in Excel 2007 SP2 (results formatted as General)
=INT(123456789 - 0.0000004) -- 123456789
=A1-INT(A1) -- 0
--ron
|