Skip Navigation

Why is 0.1 + 0.2 returns 0.30000000000000004 in JavaScript?

medium.com Why is 0.1 + 0.2 returns 0.3000000004 in JavaScript?

Have you performed simple arithmetic operations like 0.1 + 0.2? You might have gotten something strange: 0.1 + 0.2 = 0.3000000004.

Why is 0.1 + 0.2 returns 0.3000000004 in JavaScript?

Have you performed simple arithmetic operations like 0.1 + 0.2? You might have gotten something strange: 0.1 + 0.2 = 0.30000000000000004.

25
25 comments
You've viewed 25 comments.