Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ROUND() with two faces
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
ROUND() with two faces
Divers
Thread ID:
00214079
Message ID:
00214079
Vues:
49
I am currently verifing data in our price table. A unit price is listed in diffrent discount rates on one screen. In verifing that the dicounts were correct I ran across a rounding problem.

In the command window I can see the following results:

ntemp = 3379.500000000 * .95 results is 3210.525000000
round(ntemp,2) 3210.53

Yet in a program I get:
ntemp = 3379.50000000 * .95 results in 3210.525000000
round(ntemp,2) 3210.52

one cent off!

I have made no set decimal or set fixed changes between the command window and running the program, yet it results in a cent diffrence.

Any Ideas?
TIA
Jeff Pearce
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform