Lucee Version: Lucee 18.104.22.168
When trying this example below, for the ‘c’ value, it seems that 89.565 does not round up to 89.57 as it’s supposed to do…
In lucee 6 this is not the case.
Hi andreas, same result when using precisionEvaluate()
Related ticket in Jira : [LDEV-3158] - Lucee
PrecisionEvaluate() would be for math equations to stop binary to decimal conversion errors.
Follow to LDEV-2863 bug and you will see my rounding test program.
numberformat() seems to be the best to round.
Lucee 6 fixed most of the problems. I think I see one error from trycf.com for Lucee 6. I guess I will look into it.
ACF still isn’t very good either.
Thanks for the reply, kabutotx. However, with
numberformat() , there is another range of numbers that are not accurate when using this function. For example, 237453.525 will return 237453.52, not 237453.53
Bummer. That example also breaks Lucee 6. I will try to look at 6 and maybe add a bug report. I will have to re-setup my system to compile Lucee.
I think Lucee 5 is only getting regression and security fixes, so it won’t be fixed in 5.