A RANDOM NUMBER GENERATOR FOR PCS

被引:48
作者
MARSAGLIA, G [1 ]
NARASIMHAN, B [1 ]
ZAMAN, A [1 ]
机构
[1] FLORIDA STATE UNIV,DEPT STAT,TALLAHASSEE,FL 32306
基金
美国国家科学基金会;
关键词
Computer Operating Systems--Program Processors - Computer Programming--Subroutines - Computers; Personal;
D O I
10.1016/0010-4655(90)90033-W
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
It is now possible to do serious scientific work on personal computers (PC's). Many simulation studies, whether exploratory or for production runs, call for random numbers. We offer here a new kind of random number generator with implementation tailored specifically for PC's using Intel 8088/8086 or 80286/80386 processors. A floating-point coprocessor is not required or even useful for the generator, although, of course, a coprocessor may help other parts of a simulation. The generator has an extremely long period - some 21407 - requires only 43 stored values and uses only one arithmetic operation: subtraction. It is one of a new class of generators that we have recently developed. They are called add-with-carry and subtract-with-borrow generators. Related to lagged-Fibonacci generators, the new class has an interesting underlying theory, astonishingly long periods and provable uniformity for full sequences. This article describes a machine language subroutine that provides 32-bit random integers as well as uniform (single precision) reals with standard 24-bit fractions. © 1990.
引用
收藏
页码:345 / 349
页数:5
相关论文
共 6 条