Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why not 1*(0.5-0.4-0.1) = 0?
Message
From
06/01/2005 20:12:41
 
 
To
06/01/2005 18:55:24
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Database:
MS SQL Server
Miscellaneous
Thread ID:
00974881
Message ID:
00974927
Views:
41
Speaking as a quasi-math-dude:

Two numbers A and B are "equal" if ABS(A-B) < C for any positive value of C ... that is, if the difference between the two is smaller than any number, regardless of how small.

Thus 1 = .9999 (repeating) because you can make the difference as small as you like by adding in enough 9's.

(This has to do with limits and such in math, and is not intended as a very precise statement, but it should do ...)


>>With ANY decimal numbers you will have some rounding errors. Sometimes the programs masks the error, and you get the result you want, and sometimes you get the wrong value, there's simply no way to avoid that. You can calculate with a million decimals and minimize the error, but you simply can not eliminate it. Everyone knows that (1/3)*3=1, but still all the calculators and programs I have seen shows 0.99999. In practice it's the same problem, it's only easier to see it.
>>
>
>
>now that one i can understand:
>
>even though i agree that 3 thirds equal 1, but the conputer must work with 1/3 differently. it needs to break it down into 1:3 (as we write in germany), which comes out to 0.3333333 (endless).
>
>now if you multiply this by 3 it will never be 1 - it should always be 0.9999999 (endless).
>
>
>but i am sure some math-dude can explain exacly how this is. <s>
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform