105 DOUBLE PRECISION X( N )
112 parameter( one = 1.0d0 )
115 parameter( lv = 128, ipw2 = 4096, r = one / ipw2 )
118 INTEGER I, I1, I2, I3, I4, IT1, IT2, IT3, IT4, J
124 INTRINSIC dble, min, mod
127 DATA ( mm( 1, j ), j = 1, 4 ) / 494, 322, 2508,
129 DATA ( mm( 2, j ), j = 1, 4 ) / 2637, 789, 3754,
131 DATA ( mm( 3, j ), j = 1, 4 ) / 255, 1440, 1766,
133 DATA ( mm( 4, j ), j = 1, 4 ) / 2008, 752, 3572,
135 DATA ( mm( 5, j ), j = 1, 4 ) / 1253, 2859, 2893,
137 DATA ( mm( 6, j ), j = 1, 4 ) / 3344, 123, 307,
139 DATA ( mm( 7, j ), j = 1, 4 ) / 4084, 1848, 1297,
141 DATA ( mm( 8, j ), j = 1, 4 ) / 1739, 643, 3966,
143 DATA ( mm( 9, j ), j = 1, 4 ) / 3143, 2405, 758,
145 DATA ( mm( 10, j ), j = 1, 4 ) / 3468, 2638, 2598,
147 DATA ( mm( 11, j ), j = 1, 4 ) / 688, 2344, 3406,
149 DATA ( mm( 12, j ), j = 1, 4 ) / 1657, 46, 2922,
151 DATA ( mm( 13, j ), j = 1, 4 ) / 1238, 3814, 1038,
153 DATA ( mm( 14, j ), j = 1, 4 ) / 3166, 913, 2934,
155 DATA ( mm( 15, j ), j = 1, 4 ) / 1292, 3649, 2091,
157 DATA ( mm( 16, j ), j = 1, 4 ) / 3422, 339, 2451,
159 DATA ( mm( 17, j ), j = 1, 4 ) / 1270, 3808, 1580,
161 DATA ( mm( 18, j ), j = 1, 4 ) / 2016, 822, 1958,
163 DATA ( mm( 19, j ), j = 1, 4 ) / 154, 2832, 2055,
165 DATA ( mm( 20, j ), j = 1, 4 ) / 2862, 3078, 1507,
167 DATA ( mm( 21, j ), j = 1, 4 ) / 697, 3633, 1078,
169 DATA ( mm( 22, j ), j = 1, 4 ) / 1706, 2970, 3273,
171 DATA ( mm( 23, j ), j = 1, 4 ) / 491, 637, 17,
173 DATA ( mm( 24, j ), j = 1, 4 ) / 931, 2249, 854,
175 DATA ( mm( 25, j ), j = 1, 4 ) / 1444, 2081, 2916,
177 DATA ( mm( 26, j ), j = 1, 4 ) / 444, 4019, 3971,
179 DATA ( mm( 27, j ), j = 1, 4 ) / 3577, 1478, 2889,
181 DATA ( mm( 28, j ), j = 1, 4 ) / 3944, 242, 3831,
183 DATA ( mm( 29, j ), j = 1, 4 ) / 2184, 481, 2621,
185 DATA ( mm( 30, j ), j = 1, 4 ) / 1661, 2075, 1541,
187 DATA ( mm( 31, j ), j = 1, 4 ) / 3482, 4058, 893,
189 DATA ( mm( 32, j ), j = 1, 4 ) / 657, 622, 736,
191 DATA ( mm( 33, j ), j = 1, 4 ) / 3023, 3376, 3992,
193 DATA ( mm( 34, j ), j = 1, 4 ) / 3618, 812, 787,
195 DATA ( mm( 35, j ), j = 1, 4 ) / 1267, 234, 2125,
197 DATA ( mm( 36, j ), j = 1, 4 ) / 1828, 641, 2364,
199 DATA ( mm( 37, j ), j = 1, 4 ) / 164, 4005, 2460,
201 DATA ( mm( 38, j ), j = 1, 4 ) / 3798, 1122, 257,
203 DATA ( mm( 39, j ), j = 1, 4 ) / 3087, 3135, 1574,
205 DATA ( mm( 40, j ), j = 1, 4 ) / 2400, 2640, 3912,
207 DATA ( mm( 41, j ), j = 1, 4 ) / 2870, 2302, 1216,
209 DATA ( mm( 42, j ), j = 1, 4 ) / 3876, 40, 3248,
211 DATA ( mm( 43, j ), j = 1, 4 ) / 1905, 1832, 3401,
213 DATA ( mm( 44, j ), j = 1, 4 ) / 1593, 2247, 2124,
215 DATA ( mm( 45, j ), j = 1, 4 ) / 1797, 2034, 2762,
217 DATA ( mm( 46, j ), j = 1, 4 ) / 1234, 2637, 149,
219 DATA ( mm( 47, j ), j = 1, 4 ) / 3460, 1287, 2245,
221 DATA ( mm( 48, j ), j = 1, 4 ) / 328, 1691, 166,
223 DATA ( mm( 49, j ), j = 1, 4 ) / 2861, 496, 466,
225 DATA ( mm( 50, j ), j = 1, 4 ) / 1950, 1597, 4018,
227 DATA ( mm( 51, j ), j = 1, 4 ) / 617, 2394, 1399,
229 DATA ( mm( 52, j ), j = 1, 4 ) / 2070, 2584, 190,
231 DATA ( mm( 53, j ), j = 1, 4 ) / 3331, 1843, 2879,
233 DATA ( mm( 54, j ), j = 1, 4 ) / 769, 336, 153,
235 DATA ( mm( 55, j ), j = 1, 4 ) / 1558, 1472, 2320,
237 DATA ( mm( 56, j ), j = 1, 4 ) / 2412, 2407, 18,
239 DATA ( mm( 57, j ), j = 1, 4 ) / 2800, 433, 712,
241 DATA ( mm( 58, j ), j = 1, 4 ) / 189, 2096, 2159,
243 DATA ( mm( 59, j ), j = 1, 4 ) / 287, 1761, 2318,
245 DATA ( mm( 60, j ), j = 1, 4 ) / 2045, 2810, 2091,
247 DATA ( mm( 61, j ), j = 1, 4 ) / 1227, 566, 3443,
249 DATA ( mm( 62, j ), j = 1, 4 ) / 2838, 442, 1510,
251 DATA ( mm( 63, j ), j = 1, 4 ) / 209, 41, 449,
253 DATA ( mm( 64, j ), j = 1, 4 ) / 2770, 1238, 1956,
255 DATA ( mm( 65, j ), j = 1, 4 ) / 3654, 1086, 2201,
257 DATA ( mm( 66, j ), j = 1, 4 ) / 3993, 603, 3137,
259 DATA ( mm( 67, j ), j = 1, 4 ) / 192, 840, 3399,
261 DATA ( mm( 68, j ), j = 1, 4 ) / 2253, 3168, 1321,
263 DATA ( mm( 69, j ), j = 1, 4 ) / 3491, 1499, 2271,
265 DATA ( mm( 70, j ), j = 1, 4 ) / 2889, 1084, 3667,
267 DATA ( mm( 71, j ), j = 1, 4 ) / 2857, 3438, 2703,
269 DATA ( mm( 72, j ), j = 1, 4 ) / 2094, 2408, 629,
271 DATA ( mm( 73, j ), j = 1, 4 ) / 1818, 1589, 2365,
273 DATA ( mm( 74, j ), j = 1, 4 ) / 688, 2391, 2431,
275 DATA ( mm( 75, j ), j = 1, 4 ) / 1407, 288, 1113,
277 DATA ( mm( 76, j ), j = 1, 4 ) / 634, 26, 3922,
279 DATA ( mm( 77, j ), j = 1, 4 ) / 3231, 512, 2554,
281 DATA ( mm( 78, j ), j = 1, 4 ) / 815, 1456, 184,
283 DATA ( mm( 79, j ), j = 1, 4 ) / 3524, 171, 2099,
285 DATA ( mm( 80, j ), j = 1, 4 ) / 1914, 1677, 3228,
287 DATA ( mm( 81, j ), j = 1, 4 ) / 516, 2657, 4012,
289 DATA ( mm( 82, j ), j = 1, 4 ) / 164, 2270, 1921,
291 DATA ( mm( 83, j ), j = 1, 4 ) / 303, 2587, 3452,
293 DATA ( mm( 84, j ), j = 1, 4 ) / 2144, 2961, 3901,
295 DATA ( mm( 85, j ), j = 1, 4 ) / 3480, 1970, 572,
297 DATA ( mm( 86, j ), j = 1, 4 ) / 119, 1817, 3309,
299 DATA ( mm( 87, j ), j = 1, 4 ) / 3357, 676, 3171,
301 DATA ( mm( 88, j ), j = 1, 4 ) / 837, 1410, 817,
303 DATA ( mm( 89, j ), j = 1, 4 ) / 2826, 3723, 3039,
305 DATA ( mm( 90, j ), j = 1, 4 ) / 2332, 2803, 1696,
307 DATA ( mm( 91, j ), j = 1, 4 ) / 2089, 3185, 1256,
309 DATA ( mm( 92, j ), j = 1, 4 ) / 3780, 184, 3715,
311 DATA ( mm( 93, j ), j = 1, 4 ) / 1700, 663, 2077,
313 DATA ( mm( 94, j ), j = 1, 4 ) / 3712, 499, 3019,
315 DATA ( mm( 95, j ), j = 1, 4 ) / 150, 3784, 1497,
317 DATA ( mm( 96, j ), j = 1, 4 ) / 2000, 1631, 1101,
319 DATA ( mm( 97, j ), j = 1, 4 ) / 3375, 1925, 717,
321 DATA ( mm( 98, j ), j = 1, 4 ) / 1621, 3912, 51,
323 DATA ( mm( 99, j ), j = 1, 4 ) / 3090, 1398, 981,
325 DATA ( mm( 100, j ), j = 1, 4 ) / 3765, 1349, 1978,
327 DATA ( mm( 101, j ), j = 1, 4 ) / 1149, 1441, 1813,
329 DATA ( mm( 102, j ), j = 1, 4 ) / 3146, 2224, 3881,
331 DATA ( mm( 103, j ), j = 1, 4 ) / 33, 2411, 76,
333 DATA ( mm( 104, j ), j = 1, 4 ) / 3082, 1907, 3846,
335 DATA ( mm( 105, j ), j = 1, 4 ) / 2741, 3192, 3694,
337 DATA ( mm( 106, j ), j = 1, 4 ) / 359, 2786, 1682,
339 DATA ( mm( 107, j ), j = 1, 4 ) / 3316, 382, 124,
341 DATA ( mm( 108, j ), j = 1, 4 ) / 1749, 37, 1660,
343 DATA ( mm( 109, j ), j = 1, 4 ) / 185, 759, 3997,
345 DATA ( mm( 110, j ), j = 1, 4 ) / 2784, 2948, 479,
347 DATA ( mm( 111, j ), j = 1, 4 ) / 2202, 1862, 1141,
349 DATA ( mm( 112, j ), j = 1, 4 ) / 2199, 3802, 886,
351 DATA ( mm( 113, j ), j = 1, 4 ) / 1364, 2423, 3514,
353 DATA ( mm( 114, j ), j = 1, 4 ) / 1244, 2051, 1301,
355 DATA ( mm( 115, j ), j = 1, 4 ) / 2020, 2295, 3604,
357 DATA ( mm( 116, j ), j = 1, 4 ) / 3160, 1332, 1888,
359 DATA ( mm( 117, j ), j = 1, 4 ) / 2785, 1832, 1836,
361 DATA ( mm( 118, j ), j = 1, 4 ) / 2772, 2405, 1990,
363 DATA ( mm( 119, j ), j = 1, 4 ) / 1217, 3638, 2058,
365 DATA ( mm( 120, j ), j = 1, 4 ) / 1822, 3661, 692,
367 DATA ( mm( 121, j ), j = 1, 4 ) / 1245, 327, 1194,
369 DATA ( mm( 122, j ), j = 1, 4 ) / 2252, 3660, 20,
371 DATA ( mm( 123, j ), j = 1, 4 ) / 3904, 716, 3285,
373 DATA ( mm( 124, j ), j = 1, 4 ) / 2774, 1842, 2046,
375 DATA ( mm( 125, j ), j = 1, 4 ) / 997, 3987, 2107,
377 DATA ( mm( 126, j ), j = 1, 4 ) / 2573, 1368, 3508,
379 DATA ( mm( 127, j ), j = 1, 4 ) / 1148, 1848, 3525,
381 DATA ( mm( 128, j ), j = 1, 4 ) / 545, 2366, 3801,
396 DO 10 i = 1, min( n, lv )
405 it3 = it3 + i3*mm( i, 4 ) + i4*mm( i, 3 )
408 it2 = it2 + i2*mm( i, 4 ) + i3*mm( i, 3 ) + i4*mm( i, 2 )
411 it1 = it1 + i1*mm( i, 4 ) + i2*mm( i, 3 ) + i3*mm( i, 2 ) +
413 it1 = mod( it1, ipw2 )
417 x( i ) = r*( dble( it1 )+r*( dble( it2 )+r*( dble( it3 )+r*
420 IF (x( i ).EQ.1.0d0)
THEN
subroutine dlaruv(iseed, n, x)
DLARUV returns a vector of n random real numbers from a uniform distribution.