Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The old issue ( bug ) on ROUND() function
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00977091
Message ID:
00977421
Views:
34
>Run this:
>
>CLEAR
>FOR K=3 TO 15
>    x=ROUND(ROUND(147.325,m.k),2)
>	? m.k	,	m.x
>NEXT
>
Fabio,

This is a result of the limitations of VFP's mathematical precision, which is documented. As soon as you hit 15 digits (including the decimal point) you lose accuracy. This is not only known, but documented as well.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform