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

Yes, if you use limited-precision data types. But you have it the wrong way, if you first cancel out the $BIGNUM (ie. reorder to $BIGNUM - $BIGNUM + 1) the answer is 1; if you first evaluate $BIGNUM+1, the answer is 0 because $BIGNUM+1 has no representation distinct from $BIGNUM. Limited-precision arithmetic is not, in general, associative. Still arithmetic, though, just not in the ring of integers. But the whole point of the article was that it's, of course, possible to do better and get exact results.



Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: