source:
PSPA/parmelaPSPA/trunk/rannor.f
@
315
Last change on this file since 315 was 12, checked in by , 12 years ago | |
---|---|
File size: 409 bytes |
Line | |
---|---|
1 | c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 | subroutine rannor(a,b) |
3 | c---a,b are gaussian random numbers of mean 0 and variance 1 |
4 | c---uses random number generator supplied with parmela |
5 | include 'constcom.h' |
6 | |
7 | y = sandom(d) |
8 | z = sandom(d) |
9 | x = twopi*z |
10 | a1 = sqrt(-2.0*alog(y)) |
11 | a = a1*sin(x) |
12 | b = a1*cos(x) |
13 | return |
14 | end |
Note: See TracBrowser
for help on using the repository browser.