Javascript Number toFixed(n)
Number.prototype.toFixed = function(n) { return (this + 1e-14)._toFixed(n); };