Displaying 2 results from an estimated 2 matches for "m000449".
2006 Jun 23
6
float calculation error
Hi
I have the following values
pActualCost = 33.00
pPaymentCost = 29.99
So this calculation should leave me with 0.01
pPaymentDifference = pActualCost - pPaymentCost
however when doing this in rails, it returns 0.00999999999999801
has anyone got any suggestions to whats going wrong and how I can
correct this
Thanks
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Jun 08
1
formatting amount
Hi,
What is the best way to format amount in RoR?
e.g $12000.937 => $12,000.94
Thanks,
Hari
--
Posted via http://www.ruby-forum.com/.