Parent Directory
|
Revision Log
|
Revision Graph
o refining osse setup
1 | afe | 1.1 | c*** returns a vector of random values N(variance=1,mean=0) |
2 | subroutine random2(work1,n) | ||
3 | |||
4 | implicit none | ||
5 | |||
6 | integer, intent(in) :: n | ||
7 | real, intent(out) :: work1(n) | ||
8 | real, allocatable :: work2(:) | ||
9 | real, pi | ||
10 | |||
11 | allocate (work2(n)) | ||
12 | |||
13 | pi=3.14159 | ||
14 | call random_number(work1) | ||
15 | call random_number(work2) | ||
16 | work1=sqrt(-2.*log(work1))*cos(2.*pi*work2) | ||
17 | |||
18 | deallocate(work2) | ||
19 | end subroutine random2 |
ViewVC Help | |
Powered by ViewVC 1.1.22 |