I have this PHP code below:
$value = -.9;
for ($i = 0; $i <= 6; $i++) {
echo "value = $value , ";
$value += .3;
}
Output:
value = -0.9 , value = -0.6 , value = -0.3 , value = -1.11022302463E-16 , value = 0.3 , value = 0.6 , value = 0.9 ,
Why am I getting -1.11022302463E-16 and not 0? And what can I do to correct the problem? Thanks again.