Hire Me! I'm currently looking for my next role in developer relations and advocacy. If you've got
an open role and think I'd be a fit, please reach out. You can also find me
on LinkedIn.
I found this while checking the queue at CFLib. (A function that addresses this will be released shortly.) Conside the following code snippet:
<cfset VAT = 599 * 0.175>
<cfoutput>
DecimalFormat(104.825)=#DecimalFormat(104.825)#<br>
DecimalFormat(vat)=#DecimalFormat(vat)#<br>
Vat=#vat#
</cfoutput>
<cfoutput>
DecimalFormat(104.825)=#DecimalFormat(104.825)#<br>
DecimalFormat(vat)=#DecimalFormat(vat)#<br>
Vat=#vat#
</cfoutput>
When run, you see that decimalFormat on the number returns 104.83. But decimalFormat on the variable (which equals the same number), returns 104.82.