View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Karl Itschen Karl Itschen is offline
external usenet poster
 
Posts: 3
Default Can excel calculate?

You're not serious are you? You mean, as I know the
difference will be 0.1, I should round the wrong result
from the calculation so that it fits 0.1 !!!???

Btw, I'm using this value as a seed for a filename, and
I'm happier if my file is called:
64_1.txt and not
64_0.999999999999946.txt ;-)

I guess you have to be VERY careful with numbers in VB...
Karl
oh, and C++ does it right! (see my answer to your 1st post)

-----Original Message-----
How to write 64.1-64 and get EXACTLY 0.1 ? (that must be
possible in VB or not?)


Why? The deviation we are talking about here is of the
same order as 1 cm compared to the distance between the
earth and the sun. If you do not want to see the mess
caused by the calculations, round the result to the
desired number of decimals.
.