Need a random # generator

Janusz Michalak jwm at asp.biogeo.uw.edu.pl
Mon Dec 18 07:00:00 EST 1995


Hi Tim,

Try this - it is old but good ( only for 32 bit float ):

subroutine rando ( ix, iy, ay )
iy=ix*65539
if(iy) 1,2,2
1 iy=iy+2147483647+1
2 ay=iy
ay=ay*.4656613E-9
return
end

------------------

ix='something'
do 1 n=1,'another something'
call rando(ix,iy,ay)
ix=iy
write(*,*)ay
1 continue

------------------

Janusz Michalak





More information about the grass-user mailing list