Forum Moderators: open
I used the expression mentionned in the title to output a floating figure from a MySQL float column type . If the amount in the table is for instance 7.60 the expression produces 7.59 instead of 7.6O. The difference is very small but could become big on a sum done on a large number of values.
Any help on this?
Regards.
D.B
It is now a numeric data type.
This (7.6 -> 7.59) is an artifact of floating point precision, you will find it in almost any type of programming (drives me nuts in Javascript.) Alternatively you can use the formatting tools in the language of your choice to correctly pad/truncate numbers.