Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why not 1*(0.5-0.4-0.1) = 0?
Message
From
07/01/2005 04:10:41
 
 
To
06/01/2005 20:40:38
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Database:
MS SQL Server
Miscellaneous
Thread ID:
00974881
Message ID:
00974991
Views:
35
Hi Jim,

read my message#974988 to Dragan.

>Hi Tore,
>
>It may well be that there's no "solution" in VFP, or even on the Intel platform, but that certainly is not the fault of computers and binary values.
>
>IBM had packed-decimals and one of its benefits was exactly that 'decimals' could be handled as the user wished.
>
>cheers
>
>>Hi Cetin,
>>
>>There is no sulution as such. The problem is that NO decimal numbers has an accurate binary value, so it's always a matter of rounding. To get accurate calculations with decimals, you must multiply all the numbers by a 10, 100, 1000 or another power of 10, so that you only calculate the integers (whole numbers) which have accurate binary values. Then you must divede the result with the same factor. I am suprised you did not know that?
>>
>>>A friend of mine asked this to me today. I said yes,0 with confidence and he said OK then go and put that in Excel as a formula.
>>>I thought it was an Excel bug but he turned and said it happens in SQL server with float datatype! I couldn't yet see that myself but trust his experience.
>>>Any idea and solution?
>>>TIA
>>>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform