$j = 0.1 + 0.2;
$k = 15.27 - (50.39 - 35.12);
var_dump($j); // outputs: 0.3
var_dump($k); // outputs: -3.5527136788005E-15
Both $j and $k have precision loss in binary. But why are they displayed differently in PHP? $j seems to be rounded to one tenth, where $k is not. :/
Can someone explain?