adamwdraper/Numeral-js — pull request #160 by JPricey (2014-04-17 02:24:00+00:00)
Title: Fixes problem with many optional decimals

If a large number of decimals is passed into Java-script’s 'toFixed', it can introduce some errors caused by floating point numbers being imprecise.

Ex: (1.1).toFixed(17) = "1.10000000000000009".

This will cause problems in numeral's 'toFixed' as well.
This change minimizes the value we pass into JS's 'toFixed' to reduce the chance of getting such an error.

This is done by taking into consideration how many decimals are in the value passed into 'toFixed', and not use more precision than required.