Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing to a higer precision
Message
From
18/12/2002 17:59:58
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00734294
Message ID:
00734310
Views:
20
Thanks a lot Larry

It did the job. Still I'm uncomfortable by knowing that VFP operations does not make the necessary adjustements for the result in order to obtain better precision, it could be a particular issue with currency variables.

Regards
Oscar


>>I'm making a divide operation between two currency variables and an integer:
>>
>>lnResult = lnCurrency1 / lnInteger / lnCurrency2
>>
>>No matter how I group this operation, the result gives me acurrency result with a precision of 4 decimals.
>>
>>Due to the nature of the numbers I'm handling, and the volume of the data being handled, I´m loosing some significant amounts.
>>
>>How can I get a higer precision number with at least 6 decimal places?
>>
>>Thanks in advance for any hints.
>>
>
>Oscar,
>The currency data type is limited to 4 decimal places. If you want larger precision, convert it before you perform the operation using the MTON (money to number) function.
>
>Ex.
>lnResult = mton(lnCurrency1) / lnInteger / mton(lnCurrency2)
>
>HTH.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform