Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$5 difference due to rounding?
Message
From
15/11/2006 16:31:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
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:
01170080
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>>With all these items sorted I now have a discrepancy less than 50 cents for the whole report, which I think is acceptable.
>>
>>Hi Naomi,
>>IMO is abnormal discrepancy # 00.00$. This is money and not apples.
>>Sorry, this is IMO.
>
>50 cents for 10K do not make much of a difference. At least here in USA. If I would live in Baltic country (say, Russia or Bulgaria) may be I would need to be precise to a penny, if this is possible.
>
>But in fact I now have less than 2 cents discrepancy for a total report.

You should have zero. I've spent my five hours over this in 1990 (mFoxPlus then), and the crux of the matter is that you shouldn't apply any percentage, coefficient or whatever multiplication to any numbers added - only to each number in turn. If you want to calculate 1% out of 100 numbers, and 1% of their total, it's a safe bet you'll be a few cents off each time, because of the rounding.

Now on each of these numbers you have this commission calculated once - when the document was saved. Save this commission as well, and never calculate it again. Just add the value as it is saved in the commission field, and you'll have zero discrepancy. No such field? Add it.

BTW, for Fox folks here, "memo" is a "memorandum on consignment" and has nothing to do with memo fields.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform