Blame view

fvn_fnlib/ranf.f 558 Bytes
38581db0c   daniau   git-svn-id: https...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
        function ranf (sw)
  c
  c this random number generator is only a convenient driver routine
  c for the portable generator random.
  c the random number lies between 0. and 1.
  c
        common /rantab/ t(33)
        external random
        data ranold /0./
  c
        if (sw.lt.0.) go to 10
  c
        ranf = random (t, 32)
        ranold = ranf
        return
  c
   10   write (6, 20) (t(i), i=1,33)
   20   format (///10x, 28h current random number table // (10x, 5f15.10))
  c
        write (7, 30) (t(i), i=1,33)
   30   format (5f15.10)
  c
        ranf = ranold
        return
        end