"Gordon" <(E-Mail Removed)> wrote:
>"Michael C" <(E-Mail Removed)> wrote in message
>news:e47$TP$$(E-Mail Removed)...
>
>> This is quite interesting and I'm not sure I fully understand what is
>> going on but let me explain what I think is happening. In EVERY situation
>> the actual value in the cell is correct. And in EVERY function I have
>> tested (only the ones you mentioned here, including A1+1 and A1-1) the
>> correct value is used (ie 65535 is used, not 100,000).
>
>Interesting. I entered the calculation "850*77.1" in A1 and got the 100000
>answer as expected. In cell C1 I entered the formula "=A1-1" and got the
>correct answer, 65534. In cell E1 I entered the formula "=A1+1" and got the
>unexpected answer, 100001!
>
"there are 6 floating point numbers (using binary representation)
between 65534.99999999995 and 65535, and 6 between
65535.99999999995 and 65536 that cause this problem."
When you do 850*77.1, the error is in the first set of numbers.
Adding 1, you jump to the second set. Add .5, 2, or 1.1 and you
won't see the problem.
--
__________________________________________________________________________________
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? -
http://mvp.support.microsoft.com/