Why Does 2.3 + 0.4 Equal 2.6999999999999997 Instead of 2.7?
I'm puzzled why adding 2.3 and 0.4 in JavaScript results in 2.6999999999999997 instead of the expected 2.7. Can anyone explain what's going on with this calculation?
I'm puzzled why adding 2.3 and 0.4 in JavaScript results in 2.6999999999999997 instead of the expected 2.7. Can anyone explain what's going on with this calculation?