All functions now support BigDecimal
Does this now include cfloop with non-integer “step” attributes? Because I posted awhile back how those were still clearly using double, when they ought to now be using BigDecimal. See my prior post here for details:
Fun bug I found. On this page (click to view it):
Bug : Number, multiplication and .99999999999
…user TonyMonast gives a code sample involving CFLOOP. Having just downloaded Lucee 6, I was eager to run code snippets like these that are problematical back when Lucee used “double” for calculations but should work correctly now that Lucee 6 uses “BigDecimal” instead. So I ran this code, stripping out the round() functions, to see if the results were now correct thanks to BigDecimal being use…
Also, NumberFormat() has a serious bug pertaining to BigDecimal (but it also happens on doubles too), which I reported here:
Hey, it happens in the 12th position with “Precise Math” turned off, too.
I just turned it off, then made a version of the test code that only uses 12 places after the decimal, and the problem still happens:
<cfset my_number = 0.111111111111>
<cfset my_formatted_number = NumberFormat(my_number,"0.000000000000")>
<cfdump eval="my_number">
<cfdump eval="my_formatted_number"><hr>
<cfset my_number = 0.999999999999>
<cfset my_formatted_number = NumberFormat(my_number,"0.000000000000")>
<cfdump ev…