Fix large number rounding

Ditch division and logarithms entirely to avoid floating point errors.

Closes #6
Merge pull request #6 from KenanY/fix-large-number-rounding

Fix large number rounding