Number.prototype.toDigits = function() {
var str = this.toString(), tmp = '', i, d,
x = str.match(/^(\d+)\.(\d+)[eE]([-+]?)(\d+)$/);
if(x) {
d = x[2];
i = (x[3] == '-') ? x[4]-1 : x[4]-d.length;
while(i--) {
tmp += '0';
}
if(x[3] == '-') {
return '0.'+tmp+x[1]+d;
}
return x[1]+d+tmp;
}
return str;
};
alert(Math.max(Math.pow(2147483648, 2), Math.pow(2147483648, 3)).toDigits());