So if I need to accurately convert a floating point number with X digits in the 
decimal portion to one with Y (Y < X) digits what do I do?  For instance 
10.3456 to 10.34.

I have to do currency conversion prior to hitting a credit card.  The credit 
card is limited to two decimal points but the conversion can end up with many 
more.  I wrote this:

numOut = (int(numIn * 100))/100

and thought all would be well. However it is regularly off by .01 which is 
obviously a problem when dealing with money.

Shawn McKee

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226881
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to