Re: Getting random numbers.

V V V V V V V V V V V V V V V V V V V V V V V V V <[email protected]> Mon, 23 Jan 2023 15:21:06 -0800 (PST)
Newsgroups comp.lang.php
Message-ID <[email protected]>
When using random of randoms:

https://onecompiler.com/html/3yvswrdxa




On Friday, January 22, 2021 at 5:09:44 AM UTC+2, H E wrote:
> I am writing this, because JavaScript Math.random() seems to be a bit slow. 
> If the php random number maker is also too slow, then this could help. 
> 
> <html> 
> <body> 
> <div id="aa1" style="width: 100%;word-break:break-word;"> 
> </div> 
> <script> 
> var a1=Math.random()*101; 
> var a2=Math.random()*101; 
> var a3=Math.random()*101; 
> var a4=Math.random()*101; 
> var a5=Math.random()*101; 
> var a6=Math.random()*101; 
> document.getElementById("aa1").append(a1+a2+a3+a4+a5+a6); 
> var a0001=-1; 
> for(var i=0; i<99999; i++) { 
> a0001=(-1)*a0001; 
> var i01=i*0.0114643966346+i*0.0260774037134+0.1325346234; 
> a1=a5*0.020604033; 
> if(a1<0.001) a1=a1+0.0433469234896; 
> a2=0.30461*a1; 
> a3=0.470347*a2; 
> a4=0.306463*a3; 
> a5=a0001*a4*i01*0.346643634704673; 
> var j=a1*0.04326974-0.034634769432*a2+0.043986739*a3-0.3489679834*a4+0.04869374986*a5-a6; 
> document.getElementById("aa1").append(j); 
> } 
> var aa001=document.getElementById("aa1").innerHTML; 
> aa001=aa001.replace(/\./g,''); 
> aa001=aa001.replace(/\+/g,''); 
> aa001=aa001.replace(/e/g,''); 
> aa001=aa001.replace(/\-/g,''); 
> document.getElementById("aa1").innerHTML=aa001; 
> </script> 
> 
> 
> Kr. 
> 
> Phone: 372 6861327 
> E-mail: ya12983 mail c o m