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_v3_0.gz(12 Kbytes)
Manuscript Title: Pseudorandom number generators for Salford FTN77.
Authors: K.G. Hamilton
Program title: RANSAL
Catalogue identifier: ACLW_v3_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 81(1994)237
Programming language: Fortran, Assembly.
Computer: IBM PC.
Operating system: MSDOS.
RAM: 1K words
Word size: 32
Keywords: General purpose, Statistical methods, Random numbers, 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 the Tausworthe and lagged-Fibonacci methods.

Reasons for new version:
The Tausworthe generator of Chiu and Guu and the lagged-Fibonacci generator of Marsaglia, et al, were modified in References 1 and 2 to make them callable by a variety of PC Fortran compilers, using both real and 32-bit protected mode. The Salford FTN77 compiler generates a non-standard object module format, which cannot be linked to subroutines written in Microsoft MASM. As a substitute, FTN77 includes an in-line assembler that provides a MASM-like functionality. Since it was not possible to directly adapt the existing CPC library software to link with FTN77 calling programs, the algorithms were recoded to match the in-line assembler.

Unusual features:
Uses in-line assembler capability of Salford FTN77.

Running time:
Between 0.8 and 1.8 microseconds per pseudorandom number, depending on version of the routine, using an Intel 486DX2-66 CPU.

References:
[1] K.G. Hamilton, Comput. Phys. Commun. 75(1993)105-117.
[2] K.G. Hamilton, Comput. Phys. Commun. 78(1993)172-180.
[3] T.W. Chiu and T.S. Guu, Comput. Phys. Commun. 47(1987)129-137.
[4] G. Marsaglia, B. Narasimhan and A. Zaman, Comput. Phys. Commun. 60(1990)345-349.
[5] Salford Software, Ltd., "FTN77 Reference Manual," version 2.70, 1993.