Machine epsilon computation issue
问题 I stumbled on the difference between the result of Machine epsilon calculation. When compared to 0 PHP yields 4.9406564584125E-324. While for 1 it pops up with 1.1102230246252E-16. Quite a difference. Guess it's something with the type of data initially set by default in PHP. The code is: <?php //Machine epsilon calculation $e = 1; $eTmp = null; for ($i = 0; 0 != 0 + $e; $i++){ //Changing 0 by 1 produces absolutely different result $e = $e/2; if ($e != 0) {$eTmp = $e;} } echo $eTmp; //var