Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
$5 difference due to rounding?
Message
De
14/11/2006 17:56:12
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
14/11/2006 17:31:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01169448
Message ID:
01169684
Vues:
19
Fabio,

The trouble is that there are already precalculated values in a N(9,2) field. I was just trying to show the sorts of cumulative rounding errors that can result.

I've seen it before- when using a UK copy of Quickbooks in Australia or New Zealand, sales tax is calculated wrongly because it is calculated on a line-by-line basis rounded to 2 decimal places, giving cumulative rounding errors, rather than as single calculation of the grand total.

Naomi, if you do simple numeric math adding the N(9,2) values in your table, you should not see error. If you are recalculating the commission into a currency field, however, the extra 2 decimal places will cause repeated small discrepancies that may add to several cents.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform