See something weird on this result?
632.35 - 632.35 = -1.13686837722E-013
If anyone has seen something similar, please let me know!
this a part of the code:
$total_due = abs( $order_total ) - abs( $total_paid );
echo( $order_total . " - " . $total_paid . " = " . $total_due );
I've added the abs() in order to be sure that I'm dealing with
numbers, I've also used is_numeric() and confirmed it.
The echo() is showing the result I pasted up there.
any ideas??
632.35 - 632.35 = -1.13686837722E-013
If anyone has seen something similar, please let me know!
this a part of the code:
$total_due = abs( $order_total ) - abs( $total_paid );
echo( $order_total . " - " . $total_paid . " = " . $total_due );
I've added the abs() in order to be sure that I'm dealing with
numbers, I've also used is_numeric() and confirmed it.
The echo() is showing the result I pasted up there.
any ideas??
Comment