<?php
$last_percent = 0;
$as = array("110.800002098083", "30", "36.1499996185303", "11", "13", "13.9899997711182", "74.5200042724609", "13.9899997711182");
$t = 304.46000552177;
foreach($as as $a) {
$last_percent += round($a*100/$t, 2);
}
var_dump( $last_percent);
$last_percent = 100 - $last_percent;
var_dump( $last_percent);
?>
なぜ結果は 0.33000000000001 なのですか? なぜ100と99でしか起こらないのですか? $last_percent = 90 - $last_percent; を使用する場合 結果は-9.67