Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding when not wanted
Message
 
To
26/05/2005 00:32:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01017554
Message ID:
01017774
Views:
22
Yes, with currency calculations you need to be careful. As it is in VFP9 Help for currency data type:
*--------------------
If you specify more than four decimal places in a currency expression, Visual FoxPro rounds to the expression to four places before evaluating the expression.
*-------------

And for your example:
$5000.00 * 0.01099 = 55.00.

But:
$5.00 * 10.99 = 54.95
$5000.00 * 10.99 * 10^(-3)= 54.95



>Sorry.
>It happens when the data is currency (Y).
>
>Like $5000.00 * 0.01099 = 55.00.
>
>Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform