Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where currency can play an ugly joke
Message
 
 
To
16/02/2005 04:07:46
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00986817
Message ID:
00987438
Views:
60
Fabio,

>infinite bits have none influence on this issue.
>
>1/8192 is stored exactly with 0 bits !
>and, of course:
>
>? $8192*1/8192,$8192*(1/8192)
>
This shows how you don't understand the promotion of datatypes.

Expression1: Since * and / have the same precedence the first expression is evaluated left to right, the 1 gets promoted to $1: $8192 * $1 = $8192. the 8192 gets promoted to $8192: $8192 / $8192 = $1.

Expression2: 1 / 8192 = 0.0001220703125 which gets promoted to $0.0001, $8192 * $0.0001 = $0.8192

>1/10 need infinite bits to store it in binary,
>and, of course ....
>
>? $10*1/10,$10*(1/10)
>
>
>The issue is not on the right factor, but on the left fact ( the currency ).
>
>I do not want more to answer to you, is useless.

I don't particularly care if you reply. But it won't stop me from posting counterpoints to your messages.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform