Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incorrect rounging of 6 digits pecision
Message
 
À
22/04/2002 15:31:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00647785
Message ID:
00647829
Vues:
17
OK, I see the problem. It occurs when the sum of the decimals to round exceed 12. Perhaps you my use:

?ROUND( round(t1.price,5)*t2.quantity,2)



>>The product is 25.425. Why do you expect 25.43? It should be 25.42.
>
>Because, when you round 24.425 to two decimals, you get 24.43 (since the first digit dropped is a 5, VFP rounds up). Try it with the ROUND() function.
>
>Hilmar.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform