tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
6
Task/Random-numbers/PARI-GP/random-numbers.pari
Normal file
6
Task/Random-numbers/PARI-GP/random-numbers.pari
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
rnormal()={
|
||||
my(pr=32*ceil(default(realprecision)*log(10)/log(4294967296)),u1=random(2^pr)*1.>>pr,u2=random(2^pr)*1.>>pr);
|
||||
sqrt(-2*log(u1))*cos(2*Pi*u1)
|
||||
\\ Could easily be extended with a second normal at very little cost.
|
||||
};
|
||||
vector(1000,unused,rnormal()/2+1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue