0.1 + 0.2 !== 0.3 in floating point
@narwhalix▲ 5 net votes
Binary floating point can't represent 0.1 exactly. Compare with a tolerance, or use integers (e.g. cents) for money.
2 COMMENTS
Insightful
Sharp
Binary floating point can't represent 0.1 exactly. Compare with a tolerance, or use integers (e.g. cents) for money.
Insightful
Sharp