Lo que todo programador debería saber sobre aritmética de punto flotante
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

removed javascript link, works only locally

+3 -7
+3 -7
content/index.html
··· 8 8 Why don't my numbers add up? 9 9 ============================ 10 10 11 - So you've written some innocent code, say for example: 11 + So you've written some absurdly simple code, say for example: 12 12 13 - <pre> 14 - <a href="javascript:alert('0.1 + 0.2 is ' + (0.1 + 0.2))">0.1 + 0.2</a> 15 - </pre> 13 + 0.1 + 0.2 16 14 17 15 and got a really unexpected result: 18 16 19 - <pre> 20 - 0.30000000000000004 21 - </pre> 17 + 0.30000000000000004 22 18 23 19 Maybe you asked for help on some forum and got pointed to a [long article with lots of formulas](http://docs.sun.com/source/806-3568/ncg_goldberg.html) that didn't seem to help with your problem. 24 20