var number = accounting.formatNumber(10000000000000000000000000000000000000/184.77, 2);
// (IE8) number = "5,.406,574,394,463,668,5e+34.00"
// (Other) number = "5.4065743944636685e+34"
In formatNumber, the base resolves to "5.4065743944636685e+34" and the decimal resolves to "00".
This is due to Number.prototype.toFixed returning "54065743944636685000000000000000000.00", which then the base pulls out the full integer before returning it as scientific notation. I was under the impression that all of the browser implementations of toFixed properly displayed scientific notation when > 1e21.
Number.prototype.toString is properly returning "5.406574394463668e+34".
Is this simply a known issue/limitation of IE8? Or is there a workaround?
In
formatNumber
, the base resolves to "5.4065743944636685e+34" and the decimal resolves to "00".This is due to
Number.prototype.toFixed
returning "54065743944636685000000000000000000.00", which then the base pulls out the full integer before returning it as scientific notation. I was under the impression that all of the browser implementations oftoFixed
properly displayed scientific notation when > 1e21.Number.prototype.toString
is properly returning "5.406574394463668e+34".Is this simply a known issue/limitation of IE8? Or is there a workaround?