Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding of decimal places
Message
From
27/10/2003 03:47:17
 
 
To
27/10/2003 03:04:17
Janet Uy
Computer Craft Corporation
Quezon, Philippines
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00842819
Message ID:
00842825
Views:
21
>Why is the result of
>
>round(3.9 * 55.15,2) = 215.09 different from
>round(3.900000000 * 55.15,2) = 215.08 ?

Janet,

I suspect that this has something to do with the internal precision.

the result of 3.900000000 * 55.15 is a bit less than 215.085
? 3.900000000 * 55.15  && 215.0850000000000

? (3.9 * 55.15-215.085)*10000 && -0.00000000028
The round() works ok.
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform