【发布时间】:2011-07-14 04:32:00
【问题描述】:
$nt=(float) number_format("26031.87",2,".",""); // 26031.87
$nt2=(float) 546669.02-520637.15; // 26031.87
if($nt>$nt2)
echo "$nt / $nt2 ⇽ What's wrong with this!? :@";
重点是为什么会发生这种情况?如果视觉上看起来相同,一个粗略的解决方案是对 $nt2 执行 number_format(),但是...为什么??
更新 :: $nt-$nt2 输出 3.6379788070917E-12
【问题讨论】: