有人可以解释为什么total_a和total_b在应用NumberFormat后显示不同的结果?非常不可预测的行为。
<cfset total_a = 60.50 />
<cfset total_a = total_a*1.19 />
<cfoutput>#total_a# before round up<br /></cfoutput><!--- 71.995 --->
<cfset total_a = NumberFormat(total_a,'9.99') />
<cfoutput>#total_a# after round up<br /><br /></cfoutput><!--- 71.99 --->
<cfset total_b = 71.995 />
<cfoutput>#total_b# before round up<br /></cfoutput><!--- 71.995 --->
<cfset total_b = NumberFormat(total_b,'9.99') />
<cfoutput>#total_b# after round up<br /></cfoutput><!--- 72.00 --->