Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] aclw_v1_0.gz(28 Kbytes)
Manuscript Title: Pseudorandom number generators for personal computers.
Authors: K.G. Hamilton
Program title: RANTAUMAR
Catalogue identifier: ACLW_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 75(1993)105
Programming language: Assembler, Fortran.
Computer: IBM PC and compatibles.
Operating system: MSDOS.
RAM: 1K words
Word size: 16
Keywords: General purpose, Statistical methods, Random number generators, Monte Carlo, Tausworthe, Lagged-Fibonacci.
Classification: 4.13.

Other versions:
Cat Id Title Reference
AAXI_v1_0 TRCG CPC 47(1987)129
ABTL_v1_0 ACARRYPC CPC 60(1990)345

Nature of problem:
Any Monte Carlo or other calculation requiring a uniform pseudorandom number generator.

Solution method:
Pseudorandom numbers belonging to a uniform distribution are calculated using both the Tausworthe and lagged-Fibonacci method.

Reasons for new version:
The Tausworthe generator of Chiu and Guu and the lagged-Fibonacci generator of Marsaglia, et al, were modified to make them callable by a variety of PC Fortran compilers. In addition, versions were constructed that take advantage of the 32-bit wide data path and additional instructions that are available on Intel 386 ( and above) processors. New versions were also made to return an array of values in a single call, when running on 386 and higher processors in protected memory mode. The following compilers are now supported:
1. Microsoft Fortran v5.10
2. Lahey F77L (real mode) v5.01
3. Lahey F77L-EM/32 (protected mode) v5.00
4. Watcom F77 (real mode) v9.01c
5. Watcom F77/386 (protected mode) v9.01c
6. Silicon Valley Software Fortran v2.8.2

Unusual features:
Conditional assembly directives were used to allow each source file to be able to produce object.

Running time:
Between 1.0 and 3.5 microseconds per pseudorandom number, depending on version of the routine.

References:
[1] Ting-Wai Chiu and Tian-Shin Guu, Comp.Phys.Commun. 47(1987)129-137.
[2] George Marsaglia, B. Narasimhan and Arif Zaman, Comp. Phys. Commun. 60(1990)345-349.
[3] Microsoft Corporation, "Microsoft Macro Assembler Programmer's Guide, Version 6.0," Document No. LN06556-0291, 1991.