1 double precision function ran_number(x1,x2)
2 C Calculate a random real number from the range (x1,x2).
5 double precision x1,x2,fctor
6 data fctor /2147483647.0D0/
8 ran_number=x1+(x2-x1)*ix/fctor
12 integer function iran_num(n1,n2)
13 C Calculate a random integer number from the range (n1,n2).
16 real fctor /2147483647.0/
18 ix=n1+(n2-n1+1)*(ix/fctor)