Hacker News new | past | comments | ask | show | jobs | submit login

I'm pretty sure that 1.0 + 2.0 == 3.0 in IEEE 754. :) Now, 0.1 ...



For reference to what they're talking about, the helpful https://0.30000000000000004.com/


One of the great qualities of IEEE 754 is its ability to represent many integers and operate on them without rounding errors.


Yep, sorry, meant to put 0.1 ...

Thanks!


They are not the same thing, but they are close enough most of the time.

The issue with floating point arrises when comparing very close numbers.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: