Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$5 difference due to rounding?
Message
 
 
To
15/11/2006 23:55:13
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:
01170156
Views:
11
>>Jim,
>>
>>Looks like the discrepancy exists for the particular Reference number only. Somehow the original data in the table don't match my calculatations. In all other 51 cases they match exactly.
>
>That's possible only if there are no cut off decimals - i.e. the total number of non-zero decimals when you multiply the amount with the percentage is never more than two. 1% of $1 is always $0.01, and there's no rounding. 0.1% of $10 is also exactly $0.01 etc. However, if there are some hidden decimals - the "match exactly" may be what you see displayed and not what's actually stored in the variable during the calculation. You may be running under a Set("decimal")=2 and it may look right, but the jagged decimals may simply be not displayed.
>
>Try running your report with just those 51 cases, to see if they really do match. Run it with random selection of other cases, see if it always matches.

I can not exclude this 52nd bad record (which is in the middle). BTW, I already changed it again today since it looks like the user actaully wanted something different. Originally I was selecting records for the particular Paid date and particular person (I've tried several names and several dates and in practically every case I had one or two bad records with sometimes a very big difference (up to $1 or so). But it turned out that for several people the Paid date was never updated, so I had to run my report for the date range instead and now instead of 52 lines I may see 89 lines with more cases of discrepancy. As I said, I had to examine each such case closely, but I just hadn't time to do so...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform