GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
getcgn.f
Go to the documentation of this file.
1  SUBROUTINE getcgn(g)
2  INTEGER g
3 C**********************************************************************
4 C
5 C SUBROUTINE GETCGN(G)
6 C Get GeNerator
7 C
8 C Returns in G the number of the current random number generator
9 C
10 C
11 C Arguments
12 C
13 C
14 C G <-- Number of the current random number generator (1..32)
15 C INTEGER G
16 C
17 C**********************************************************************
18 C
19  INTEGER curntg,numg
20  SAVE curntg
21  parameter(numg=32)
22  DATA curntg/1/
23 C
24  g = curntg
25  RETURN
26 
27  entry setcgn(g)
28 C**********************************************************************
29 C
30 C SUBROUTINE SETCGN( G )
31 C Set GeNerator
32 C
33 C Sets the current generator to G. All references to a generat
34 C are to the current generator.
35 C
36 C
37 C Arguments
38 C
39 C
40 C G --> Number of the current random number generator (1..32)
41 C INTEGER G
42 C
43 C**********************************************************************
44 C
45 C Abort if generator number out of range
46 C
47  IF (.NOT. (g.LT.0.OR.g.GT.numg)) go to 10
48  WRITE (*,*) ' Generator number out of range in SETCGN:',
49  + ' Legal range is 1 to ',numg,' -- ABORT!'
50  CALL xstopx(' Generator number out of range in SETCGN')
51 
52  10 curntg = g
53  RETURN
54 
55  END
subroutine getcgn(g)
Definition: getcgn.f:1
may be zero for pure relative error test tem the relative tolerance must be greater than or equal to
Definition: Quad-opts.cc:233