Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accurate Numeric Calculation
Message
 
 
To
02/11/1997 11:36:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00057855
Message ID:
00057863
Views:
31
>I need to convert from one currency to another and I would like the results
>to
>be accurate no matter which way I calculate. I have a problem in converting
>from one currency to another and back to its original value and there is
>some
>discrepency (Eg. $10 x ex-rate = $18.90, then
> $18.90 x ex-rate = $9.99[should be $10
>originally] )
>
>where ex-rate is 99.9999 format.
>I tried to get the whole value by multi it with 100 or 10000, etc...
>Pls help and thanks in advance
Alvin,

Looks like the classic rounding error. When you converted the $10.00 the result was probably rounded DOWN to $18.90
then when you recalcualted the reverse exchange you got a number less than 10. For you case I do not see a practicval way of fixing this.
Ken Wardwell
Previous
Reply
Map
View

Click here to load this message in the networking platform