erikwiffin / 0.30000000000000004

Floating Point Math Examples

Home Page:https://0.30000000000000004.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add equality test

coke opened this issue · comments

I would recommend adding another test that shows whether

0.1+0.2==0.3

in the various languages. One or two will get it right, but most do not, even the ones that print 0.3 when you do the addition.

That's a good idea, but I don't particularly relish the idea of going through all these languages to add an equality test. If there are any particularly interesting examples, feel free to add them as a comment for individual languages.