Btw, the following two are equivalent (in JavaScript syntax):
var a = Math.max(Math.random(), Math.random());
var b = Math.sqrt(Math.random()); var a = Math.max(Math.random(), Math.random());
var b = Math.sqrt(Math.random());I came across that one in the other direction, when trying to work out how to make weighted rendezvous hashing work. See https://en.wikipedia.org/wiki/Rendezvous_hashing