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

Floats lose precision unexpectedly with certain fractions that are perfectly representable in decimal, and also with certain integers once you get high enough.

The standard in ad-tech (not sure about banking) is to use int64s representing either microdollars or microcents, so a max capacity of 9.3*10^13 or 10^11 dollars



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

Search: