Internally, what is going on with the floating point representation on the right to get false?
mysql> SELECT 3.1415 + 0.9585 = 4.1, 3.1415E0 + 0.9585E0 = 4.1E0;
+-----------------------+-----------------------------+
| 3.1415 + 0.9585 = 4.1 | 3.1415E0 + 0.9585E0 = 4.1E0 |
+-----------------------+-----------------------------+
| 1 | 0 |
+-----------------------+-----------------------------+
edit
Conclusion: Don’t use Float or Double for precision math. Use Decimal.
First of all, you should never use = with floating points, as you simply cannot predict if no rounding errors occur. Always use < or >, dependent on what you want to achieve.
Second: Nothing is wrong with either formula. Internally, both variants get encoded in their variables to the nearest possible binary representation, which slightly differs from the value you set.
One digit before the decimal point is standard, so all following digits are used. On the right side, you specifically define where the comma occurs, thus “wasting” a certain part at the end of the binary representation of your variable – which leads to rounding errors (in this specific case).