var x = Math.random(); alert("x = " + x + "\n" + "x.round = " + Math.round(x*Math.pow(10, 10)) / Math.pow(10, 10))