Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While your general point is correct, the details aren't. Powers of 2 are represented exactly in floating point (for any number, only the 53 most significant bits can be stored). So 2^100 + 1 is an example of something that's non-representable in JS.


We could have a philosophical debate about what number a finite precision representation represents when you exceed its precision. But on a practical level, if you print it, what do you get? An exact integer, or a floating point representation?




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

Search: