I have application that is adding a series of numbers. I expect the numbers to sum to equal 0
, but when PHP processes the math, it comes out to -1.2789769243682E-13
. I am curious why this is. When I perform the math manually it equals zero like expected.
<?php
$math = 138.57 + 138.57 + 138.57 + 138.57 + 138.57 + (-673.71) + (-19.14);
echo $math;
//-1.2789769243682E-13