Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency vs Numeric
Message
From
29/08/2005 05:23:53
 
 
To
29/08/2005 04:49:07
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01044699
Message ID:
01044707
Views:
12
>Hi all
>
>I understand that using Currency field may need to calculation inaccuracy without using MTON() function to first convert it into numeric. I would appreciate if you could advise what then are the benefits of using Currency field instead of Numeric field when designing database.
>
>Thanks & Best Regards

In the case in which you want that the result of an algebraic sum
doesn't depend on the order of the addends.
clear
a=1.0000000
b=0.1000000
c=0.2000000

? (b+c-b-c)*a=(b-b+c-c)*a

* With Numerics you should to use ROUND(),
* but the implementation of ROUND() is incorrect
* and exists results where it fails
? ROUND((b+c-b-c)*a,7)=ROUND((b-b+c-c)*a,7)
Previous
Reply
Map
View

Click here to load this message in the networking platform