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

Floating point is all about relative precision. f64 gives you 53 bits of mantissa, so you have precision of about 1.1e-16, almost 16 decimal places. But the 17th place, and sometimes the 16th place, gets clobbered.

Integers have absolute precision, at the expense of either range (say, i64) or arbitrarily growing size.



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

Search: