2*-0.3+0.6 =1.1102230246252E-16 Who knows why?
Displays -0.3*2 0.6=1.1102230246252E-16 instead of zero, who knows why? Please give me some advice
##
$x = [3, 0, 2];
$tArr = [0.2, 0.3, - 0.3];
$s = 0;
foreach ($x as $k => $e) {
$s = $ e * $tArr[$k];
echo $s . PHP_EOL;
}
孙博1758 days ago1029