Displaying 1 result from an estimated 1 matches for "total_due".
2006 Apr 12
2
Problems doing addition/subtraction with floats
Ok, I am sure this is a simplistic problem that I am just missing right now
(maybe eyes are crossed??).
However, I am trying to do simply math here.
I have these variables initialized as follows:
@amount_due = @amount_paid = @total_due = 0.0
I get @total_due and it is set to 1739.6 from the database.
I then get @amount_paid and it is set to 1739.6 from the database.
I then calculate the @amount_due = @total_due - @amount_paid.
This value is 2.27373675443232e-013.
????
Sorry if this is on the list somewhere and I missed it.
T...