I have this example
$x = 0.154 + 0.408; $y = 0.562; echo $x - $y;
You would think it's 0 but it's not ( well maybe it depends on your system and php version ). Anyway for those who don't see 0, what's the correct way to do float operations ?
I have this example
$x = 0.154 + 0.408; $y = 0.562; echo $x - $y;
You would think it's 0 but it's not ( well maybe it depends on your system and php version ). Anyway for those who don't see 0, what's the correct way to do float operations ?
$x = bcadd (0.154 ,0.408);
$y = 0.562;
echo bcsub($x,$y);