forked from: Math.random() patching test

