Wednesday, April 17, 2013

0.1 + 0.2 != 0.3


After more than 13 years experience with JavaScript I just discovered that:

0.1 + 0.2 != 0.3

read this article to understand: http://yuiblog.com/blog/2009/03/10/when-you-cant-count-on-your-numbers/

but :

(0.1 * 10 + 0.2 * 10) / 10 = 0.3

No comments: