I am just a simple Excel user. Do I need to learn how the computer stores
numbers?
Maybe 30 years or more ago.
I expected Excel (ie. the ROUND-function) to do a proper job in handling
simple decimal numbers (1 decimal accuracy). I will try to find a work around
in this case, but I have lost absolute trust in future calculations of
Excel......
> You need to learn how computer store numbers. See for example:
> INFO: Visual Basic and Arithmetic Precision
[quoted text clipped - 39 lines]
> >> >>
> >> >> Joost Keijer
Only if you want to understand why you get small non-zero numbers when you
expect exactly zero. ROUND always works.
best wishes

Signature
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
>I am just a simple Excel user. Do I need to learn how the computer stores
> numbers?
[quoted text clipped - 49 lines]
>> >> >>
>> >> >> Joost Keijer
A simple way to think about it is to use the documented limit of 15 figures.
The problem then becomes
70,0000000000000??
-69,3000000000000??
-------------------------
0,7000000000000??
which is consistent with Excel's reported result of
0,700000000000003
Understanding Bernard's references are not required to use Excel, but they
will make it clear what is actually going on. The math is exactly correct,
but Excel is working with numbers that are slightly different than you
expect. Also note that this is a finite precision issue (common to all
software except symbolic manipulators) compounded by decimal/binary
conversions (common to almost all software), and not just an Excel issue.
Most terminating decimal fractions (including ,3 and ,7) have no exact
binary representation, and hence must be approximated. When you do math with
approximate inputs, that the output is only approximate should be no
surprise. The exact value of the approximation to 69.3 is
69,2999999999999971578290569595992565155029296875
which when subtracted from 70, correctly yields
0,7000000000000028421709430404007434844970703125
Excel is working with and returning these exact values, but (as documented)
will never display more than 15 digits of any value. If you ask for more
than 15 digits, you will get meaningless trailing zeros. You can see more
using my VBA conversion functions
http://groups.google.com/group/microsoft.public.excel/browse_frm/thread/9f83ca3d
ea38e501/6efb95785d1eaff5
Jerry
> I am just a simple Excel user. Do I need to learn how the computer stores
> numbers?
[quoted text clipped - 4 lines]
> in this case, but I have lost absolute trust in future calculations of
> Excel......