Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$5 difference due to rounding?
Message
From
14/11/2006 17:56:12
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
14/11/2006 17:31:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01169448
Message ID:
01169684
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform