Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding problem?
Message
De
21/03/2000 11:17:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00348122
Message ID:
00348410
Vues:
21
Well, asigning to a variable doesn't exactly work:

a = .35000000 * 943.0 *.100
ROUND(a,2) = 33.00

BUT
a = 33.0050000000000
ROUND(a,2) = 33.01

My values to multiply are pulled from a table, hence the number of decimals used, and rounding each number first can't be done since I don't want to lose any of the decimal values. I'm going with the rounding the result to 5 decimals and then rounding to 2 which seems to work for my situation.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform