|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
numeric values acting funnyby jdts (Initiate) |
| on Dec 10, 2004 at 20:32 UTC ( [id://414040]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.jdts has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm doing some simple subtraction:
$difference = ($payment_total - $order_total);
When I print out each of the above values, the $order_totals and $payment_totals always look normal, but sometimes the $difference gives me something like: 5.6843418860808e-14. Any ideas on what might be causing this?
Thanks,
JD
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||