dswitzer
04/05/2024, 5:44 PM17.7999992 instead of 17.8 (which Lucee 5.4.3.2 returns):
select cast(17.8 as real)
Any idea what's going on?
See this thread for more details:
https://dev.lucee.org/t/sql-precision-issue-with-lucee-5-4-5-23/13697dswitzer
04/05/2024, 5:55 PMdswitzer
04/05/2024, 6:06 PMbrettpr
04/08/2024, 5:33 AMdswitzer
04/09/2024, 11:30 AMemmet
04/09/2024, 2:02 PMShawn Grigson
04/11/2024, 4:41 PMdswitzer
04/11/2024, 4:55 PMdoubleValue() on a float, it's cause the conversion. I would think changing the code from:
if (n instanceof Double || n instanceof Float) return toString(n.doubleValue());
to this:
if (n instanceof Double ) return toString(n.doubleValue());
if (n instanceof Float) return toString(n.floatValue());
would resolve the bug, since then it would correctly casting the float to a string.dswitzer
04/11/2024, 4:56 PMShawn Grigson
04/11/2024, 6:05 PMdswitzer
04/11/2024, 6:06 PM17.8 I am expecting Lucee to also report 17.8 (especially when that's always been the way it worked previously).