Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where currency can play an ugly joke
Message
 
 
À
16/02/2005 04:07:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00986817
Message ID:
00987438
Vues:
61
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform