Hacker News new | ask | show | jobs
by eru 1639 days ago
You could use arbitrary precision rational numbers.

Many languages support these in their standard libraries. (Eg Python does.)

They are a bit slow compared to ints or floats, but good for precision.