adamwdraper/Numeral-js — pull request #161 by JPricey (2014-04-23 22:13:25+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 numeral's 'toFixed' to keep intermediate steps stable.