Random number generation

From numbers

Jump to: navigation, search

Random number generation

!msgpostfix Wichmann and Hill (1982) random number generator\n

!need all

30269.0
30307.0
30323.0

!fuzz 0.000001

!msgpostfix Ziggurat method for generating normal random variables\n
!need all
3.442619855899
9.91256303526217e-3
0.2904764516147
#2.3283064365386962890625e-10 | 2^-32

!msgpostfix Ziggurat method for generating exponential random variables\n
!need all
7.697117470131487
3.949659822581572e-3


# This random number generator originally appeared in "Toward a Universal
# Random Number Generator" by George Marsaglia and Arif Zaman.
# Florida State University Report: FSU-SCRI-87-50 (1987)
#
# It was later modified by F. James and published in "A Review of Pseudo-
# random Number Generators"

!msgpostfix Test values associated with Marsaglia random number generator
!need all
6533892.0
14220222.0
7275067.0
6172232.0
8354498.0
10633180.0

!msgpostfix Marsaglia randm number generator

!need all
362436.0
16777216.0
7654321.0
16777213.0


#  W. Hoermann and G. Derflinger (1990):
#  ACR Method for generating normal random variables,
#               OR Spektrum 12 (1990), 181-185.

!msgpostfix ACR Method for generating normal random variables\n
!need all

 1.448242853
 3.307147487
 1.46754004
 1.036467755
 5.295844968
 3.631288474
 0.483941449
 0.107981933
 4.132731354
18.52161694
 0.4515827053
 0.516058551
 3.132731354
 0.375959516
 0.591923442

 0.8853395638
 0.2452635696
 0.2770276848
 0.5029324303
 0.4571828819
 0.187308492
 0.7270572718
 0.03895759111

# Ahrens, J.H. and Dieter, U.
# Extensions of Forsythe's method for random sampling from
# the normal distribution.
# Math. Comput. 27, 927-937.
#

!msgpostfix Random sampling from the normal distribution (extension of Forsythe's method)\n

!need all
#0.0000000
0.03917609
0.07841241
0.1177699
0.1573107
0.19709910
0.23720210
0.2776904
0.3186394
0.36012990
0.40225010
0.4450965
0.4887764
0.53340970
0.57913220
0.6260990
0.6744898
0.72451440
0.77642180
0.8305109
0.8871466
0.94678180
1.00999000
1.0775160
1.1503490
1.22985900
1.31801100
1.4177970
1.5341210
1.67594000
1.86273200
2.1538750

#0.0000000
#0.0000000
#0.0000000
#0.0000000
#0.0000000
0.2636843
0.2425085
0.2255674
0.2116342
0.1999243
0.1899108
0.1812252
0.1736014
0.1668419
0.1607967
0.1504094
0.1459026
0.1417700
0.1379632
0.1344418
0.1311722
0.1281260
0.1252791
0.1226109
0.1201036
0.1177417
0.1155119
0.1134023
0.1114027
0.1095039

7.673828e-4
0.002306870
0.003860618
0.005438454
0.007050699
0.008708396
0.010423570
0.012209530
0.014081250
0.016055790
0.018152900
0.020395730
0.022811770
0.025434070
0.028302960
0.031468220
0.034992330
0.038954830
0.043458780
0.048640350
0.054683340
0.061842220
0.070479830
0.081131950
0.094624440
0.112300100
0.136498000
0.171688600
0.227624100
0.330498000
0.584703100

0.03920617
0.03932705
0.03950999
0.03975703
0.04007093
0.04045533
0.04091481
0.04145507
0.04208311
0.04280748
0.04363863
0.04458932
0.04567523
0.04691571
0.04833487
0.04996298
0.05183859
0.05401138
0.05654656
0.05953130
0.06308489
0.06737503
0.07264544
0.07926471
0.08781922
0.09930398
0.11555990
0.14043440
0.18361420
0.27900160
0.70104740
Personal tools