Fix large number rounding

Ditch division and logarithms entirely to avoid floating point errors.

Closes #6