Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding of decimal places
Message
De
27/10/2003 03:47:17
 
 
À
27/10/2003 03:04:17
Janet Uy
Computer Craft Corporation
Quezon, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00842819
Message ID:
00842825
Vues:
22
>Why is the result of
>
>round(3.9 * 55.15,2) = 215.09 different from
>round(3.900000000 * 55.15,2) = 215.08 ?

Janet,

I suspect that this has something to do with the internal precision.

the result of 3.900000000 * 55.15 is a bit less than 215.085
? 3.900000000 * 55.15  && 215.0850000000000

? (3.9 * 55.15-215.085)*10000 && -0.00000000028
The round() works ok.
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform