Script started on Mon Oct 1 16:19:01 2001 lnx1 1> make tdrand48 pgf77 -g -Msecond_underscore -c tdrand48.f pgf77 -g -Msecond_underscore -L/usr/local/PGI/lib tdrand48.o -lp410f -o tdrand48 Linking: lnx1 2> tdrand48 usage: tdrand48 [] FORTRAN STOP ############################################################ # Generate 10 random numbers using the default seed. ############################################################ lnx1 3> tdrand48 10 3.9079850466805510E-014 9.8539467465030839E-004 4.1631001594613082E-002 0.1766426425429160 0.3646022483906073 9.1330612112294318E-002 9.2297647698675434E-002 0.4872172239468284 0.5267502797621084 0.4544334237382444 Average: 0.2235890474460977 FORTRAN STOP ############################################################ # Use different seeds ... ############################################################ lnx1 4> tdrand48 10 0 0.1708280361062897 0.7499019804849638 9.6371655623567420E-002 0.8704652270270756 0.5773035067951078 0.7857992588396741 0.6921941534586402 0.3687662699204211 0.8739040768618089 0.7450950984500651 Average: 0.5930629263567614 FORTRAN STOP lnx1 5> tdrand48 10 1024 0.8723921096689118 0.2505373659982695 0.2646277000113848 0.5637676199866704 0.4796618003284330 0.9366764961596203 0.9770464197702857 0.9566037275772814 0.5051937973970873 0.8319197539829020 Average: 0.6638426790880846 FORTRAN STOP ############################################################ # Use a csh foreach loop to investigate the large-n limit # of the average of the generated numbers. Also note # the use of the Unix 'time' command to report the CPU time # usage (and other statistics, see 'man time') of an # arbitrary command. ############################################################ lnx1 7> foreach n (10 100 1000 10000 100000 1000000) foreach? time tdrand48 $n > /dev/null foreach? end Average: 0.2235890474460977 FORTRAN STOP 0.000u 0.010s 0:00.00 0.0% 0+0k 0+0io 122pf+0w Average: 0.4741044494625102 FORTRAN STOP 0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 122pf+0w Average: 0.4914224988159484 FORTRAN STOP 0.010u 0.010s 0:00.01 200.0% 0+0k 0+0io 122pf+0w Average: 0.4988303692558301 FORTRAN STOP 0.100u 0.000s 0:00.10 100.0% 0+0k 0+0io 122pf+0w Average: 0.4995105666942632 FORTRAN STOP 1.010u 0.030s 0:01.03 100.9% 0+0k 0+0io 122pf+0w Average: 0.4997852648772501 FORTRAN STOP 10.180u 0.140s 0:10.33 99.9% 0+0k 0+0io 122pf+0w