A nice ColdFusion bug

Written on 10 December 2013, 11:10am

Tagged with: ,

Floating Points hit again. Use PrecisionEvaluate() to fix

15.12 + 59.70 - 74.82=#15.12 + 59.70 - 74.82# 
--outputs 1.42108547152E-014 
PrecisionEvaluate(15.12 + 59.70 - 74.82)=#PrecisionEvaluate(15.12 + 59.70 - 74.82)# 
--outputs 0.00

More here and there

Leave a response