You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
1.0 KiB

/*
* Math.random() test
*/
if (typeof print !== 'function') { print = console.log; }
function test() {
var i;
var rnd = Math.random;
for (i = 0; i < 3e5; i++) {
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd(); rnd();
}
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}