96 SUBROUTINE slaruv( ISEED, N, X )
115 parameter ( one = 1.0e0 )
118 parameter ( lv = 128, ipw2 = 4096, r = one / ipw2 )
121 INTEGER I, I1, I2, I3, I4, IT1, IT2, IT3, IT4, J
127 INTRINSIC min, mod, real
130 DATA ( mm( 1, j ), j = 1, 4 ) / 494, 322, 2508,
132 DATA ( mm( 2, j ), j = 1, 4 ) / 2637, 789, 3754,
134 DATA ( mm( 3, j ), j = 1, 4 ) / 255, 1440, 1766,
136 DATA ( mm( 4, j ), j = 1, 4 ) / 2008, 752, 3572,
138 DATA ( mm( 5, j ), j = 1, 4 ) / 1253, 2859, 2893,
140 DATA ( mm( 6, j ), j = 1, 4 ) / 3344, 123, 307,
142 DATA ( mm( 7, j ), j = 1, 4 ) / 4084, 1848, 1297,
144 DATA ( mm( 8, j ), j = 1, 4 ) / 1739, 643, 3966,
146 DATA ( mm( 9, j ), j = 1, 4 ) / 3143, 2405, 758,
148 DATA ( mm( 10, j ), j = 1, 4 ) / 3468, 2638, 2598,
150 DATA ( mm( 11, j ), j = 1, 4 ) / 688, 2344, 3406,
152 DATA ( mm( 12, j ), j = 1, 4 ) / 1657, 46, 2922,
154 DATA ( mm( 13, j ), j = 1, 4 ) / 1238, 3814, 1038,
156 DATA ( mm( 14, j ), j = 1, 4 ) / 3166, 913, 2934,
158 DATA ( mm( 15, j ), j = 1, 4 ) / 1292, 3649, 2091,
160 DATA ( mm( 16, j ), j = 1, 4 ) / 3422, 339, 2451,
162 DATA ( mm( 17, j ), j = 1, 4 ) / 1270, 3808, 1580,
164 DATA ( mm( 18, j ), j = 1, 4 ) / 2016, 822, 1958,
166 DATA ( mm( 19, j ), j = 1, 4 ) / 154, 2832, 2055,
168 DATA ( mm( 20, j ), j = 1, 4 ) / 2862, 3078, 1507,
170 DATA ( mm( 21, j ), j = 1, 4 ) / 697, 3633, 1078,
172 DATA ( mm( 22, j ), j = 1, 4 ) / 1706, 2970, 3273,
174 DATA ( mm( 23, j ), j = 1, 4 ) / 491, 637, 17,
176 DATA ( mm( 24, j ), j = 1, 4 ) / 931, 2249, 854,
178 DATA ( mm( 25, j ), j = 1, 4 ) / 1444, 2081, 2916,
180 DATA ( mm( 26, j ), j = 1, 4 ) / 444, 4019, 3971,
182 DATA ( mm( 27, j ), j = 1, 4 ) / 3577, 1478, 2889,
184 DATA ( mm( 28, j ), j = 1, 4 ) / 3944, 242, 3831,
186 DATA ( mm( 29, j ), j = 1, 4 ) / 2184, 481, 2621,
188 DATA ( mm( 30, j ), j = 1, 4 ) / 1661, 2075, 1541,
190 DATA ( mm( 31, j ), j = 1, 4 ) / 3482, 4058, 893,
192 DATA ( mm( 32, j ), j = 1, 4 ) / 657, 622, 736,
194 DATA ( mm( 33, j ), j = 1, 4 ) / 3023, 3376, 3992,
196 DATA ( mm( 34, j ), j = 1, 4 ) / 3618, 812, 787,
198 DATA ( mm( 35, j ), j = 1, 4 ) / 1267, 234, 2125,
200 DATA ( mm( 36, j ), j = 1, 4 ) / 1828, 641, 2364,
202 DATA ( mm( 37, j ), j = 1, 4 ) / 164, 4005, 2460,
204 DATA ( mm( 38, j ), j = 1, 4 ) / 3798, 1122, 257,
206 DATA ( mm( 39, j ), j = 1, 4 ) / 3087, 3135, 1574,
208 DATA ( mm( 40, j ), j = 1, 4 ) / 2400, 2640, 3912,
210 DATA ( mm( 41, j ), j = 1, 4 ) / 2870, 2302, 1216,
212 DATA ( mm( 42, j ), j = 1, 4 ) / 3876, 40, 3248,
214 DATA ( mm( 43, j ), j = 1, 4 ) / 1905, 1832, 3401,
216 DATA ( mm( 44, j ), j = 1, 4 ) / 1593, 2247, 2124,
218 DATA ( mm( 45, j ), j = 1, 4 ) / 1797, 2034, 2762,
220 DATA ( mm( 46, j ), j = 1, 4 ) / 1234, 2637, 149,
222 DATA ( mm( 47, j ), j = 1, 4 ) / 3460, 1287, 2245,
224 DATA ( mm( 48, j ), j = 1, 4 ) / 328, 1691, 166,
226 DATA ( mm( 49, j ), j = 1, 4 ) / 2861, 496, 466,
228 DATA ( mm( 50, j ), j = 1, 4 ) / 1950, 1597, 4018,
230 DATA ( mm( 51, j ), j = 1, 4 ) / 617, 2394, 1399,
232 DATA ( mm( 52, j ), j = 1, 4 ) / 2070, 2584, 190,
234 DATA ( mm( 53, j ), j = 1, 4 ) / 3331, 1843, 2879,
236 DATA ( mm( 54, j ), j = 1, 4 ) / 769, 336, 153,
238 DATA ( mm( 55, j ), j = 1, 4 ) / 1558, 1472, 2320,
240 DATA ( mm( 56, j ), j = 1, 4 ) / 2412, 2407, 18,
242 DATA ( mm( 57, j ), j = 1, 4 ) / 2800, 433, 712,
244 DATA ( mm( 58, j ), j = 1, 4 ) / 189, 2096, 2159,
246 DATA ( mm( 59, j ), j = 1, 4 ) / 287, 1761, 2318,
248 DATA ( mm( 60, j ), j = 1, 4 ) / 2045, 2810, 2091,
250 DATA ( mm( 61, j ), j = 1, 4 ) / 1227, 566, 3443,
252 DATA ( mm( 62, j ), j = 1, 4 ) / 2838, 442, 1510,
254 DATA ( mm( 63, j ), j = 1, 4 ) / 209, 41, 449,
256 DATA ( mm( 64, j ), j = 1, 4 ) / 2770, 1238, 1956,
258 DATA ( mm( 65, j ), j = 1, 4 ) / 3654, 1086, 2201,
260 DATA ( mm( 66, j ), j = 1, 4 ) / 3993, 603, 3137,
262 DATA ( mm( 67, j ), j = 1, 4 ) / 192, 840, 3399,
264 DATA ( mm( 68, j ), j = 1, 4 ) / 2253, 3168, 1321,
266 DATA ( mm( 69, j ), j = 1, 4 ) / 3491, 1499, 2271,
268 DATA ( mm( 70, j ), j = 1, 4 ) / 2889, 1084, 3667,
270 DATA ( mm( 71, j ), j = 1, 4 ) / 2857, 3438, 2703,
272 DATA ( mm( 72, j ), j = 1, 4 ) / 2094, 2408, 629,
274 DATA ( mm( 73, j ), j = 1, 4 ) / 1818, 1589, 2365,
276 DATA ( mm( 74, j ), j = 1, 4 ) / 688, 2391, 2431,
278 DATA ( mm( 75, j ), j = 1, 4 ) / 1407, 288, 1113,
280 DATA ( mm( 76, j ), j = 1, 4 ) / 634, 26, 3922,
282 DATA ( mm( 77, j ), j = 1, 4 ) / 3231, 512, 2554,
284 DATA ( mm( 78, j ), j = 1, 4 ) / 815, 1456, 184,
286 DATA ( mm( 79, j ), j = 1, 4 ) / 3524, 171, 2099,
288 DATA ( mm( 80, j ), j = 1, 4 ) / 1914, 1677, 3228,
290 DATA ( mm( 81, j ), j = 1, 4 ) / 516, 2657, 4012,
292 DATA ( mm( 82, j ), j = 1, 4 ) / 164, 2270, 1921,
294 DATA ( mm( 83, j ), j = 1, 4 ) / 303, 2587, 3452,
296 DATA ( mm( 84, j ), j = 1, 4 ) / 2144, 2961, 3901,
298 DATA ( mm( 85, j ), j = 1, 4 ) / 3480, 1970, 572,
300 DATA ( mm( 86, j ), j = 1, 4 ) / 119, 1817, 3309,
302 DATA ( mm( 87, j ), j = 1, 4 ) / 3357, 676, 3171,
304 DATA ( mm( 88, j ), j = 1, 4 ) / 837, 1410, 817,
306 DATA ( mm( 89, j ), j = 1, 4 ) / 2826, 3723, 3039,
308 DATA ( mm( 90, j ), j = 1, 4 ) / 2332, 2803, 1696,
310 DATA ( mm( 91, j ), j = 1, 4 ) / 2089, 3185, 1256,
312 DATA ( mm( 92, j ), j = 1, 4 ) / 3780, 184, 3715,
314 DATA ( mm( 93, j ), j = 1, 4 ) / 1700, 663, 2077,
316 DATA ( mm( 94, j ), j = 1, 4 ) / 3712, 499, 3019,
318 DATA ( mm( 95, j ), j = 1, 4 ) / 150, 3784, 1497,
320 DATA ( mm( 96, j ), j = 1, 4 ) / 2000, 1631, 1101,
322 DATA ( mm( 97, j ), j = 1, 4 ) / 3375, 1925, 717,
324 DATA ( mm( 98, j ), j = 1, 4 ) / 1621, 3912, 51,
326 DATA ( mm( 99, j ), j = 1, 4 ) / 3090, 1398, 981,
328 DATA ( mm( 100, j ), j = 1, 4 ) / 3765, 1349, 1978,
330 DATA ( mm( 101, j ), j = 1, 4 ) / 1149, 1441, 1813,
332 DATA ( mm( 102, j ), j = 1, 4 ) / 3146, 2224, 3881,
334 DATA ( mm( 103, j ), j = 1, 4 ) / 33, 2411, 76,
336 DATA ( mm( 104, j ), j = 1, 4 ) / 3082, 1907, 3846,
338 DATA ( mm( 105, j ), j = 1, 4 ) / 2741, 3192, 3694,
340 DATA ( mm( 106, j ), j = 1, 4 ) / 359, 2786, 1682,
342 DATA ( mm( 107, j ), j = 1, 4 ) / 3316, 382, 124,
344 DATA ( mm( 108, j ), j = 1, 4 ) / 1749, 37, 1660,
346 DATA ( mm( 109, j ), j = 1, 4 ) / 185, 759, 3997,
348 DATA ( mm( 110, j ), j = 1, 4 ) / 2784, 2948, 479,
350 DATA ( mm( 111, j ), j = 1, 4 ) / 2202, 1862, 1141,
352 DATA ( mm( 112, j ), j = 1, 4 ) / 2199, 3802, 886,
354 DATA ( mm( 113, j ), j = 1, 4 ) / 1364, 2423, 3514,
356 DATA ( mm( 114, j ), j = 1, 4 ) / 1244, 2051, 1301,
358 DATA ( mm( 115, j ), j = 1, 4 ) / 2020, 2295, 3604,
360 DATA ( mm( 116, j ), j = 1, 4 ) / 3160, 1332, 1888,
362 DATA ( mm( 117, j ), j = 1, 4 ) / 2785, 1832, 1836,
364 DATA ( mm( 118, j ), j = 1, 4 ) / 2772, 2405, 1990,
366 DATA ( mm( 119, j ), j = 1, 4 ) / 1217, 3638, 2058,
368 DATA ( mm( 120, j ), j = 1, 4 ) / 1822, 3661, 692,
370 DATA ( mm( 121, j ), j = 1, 4 ) / 1245, 327, 1194,
372 DATA ( mm( 122, j ), j = 1, 4 ) / 2252, 3660, 20,
374 DATA ( mm( 123, j ), j = 1, 4 ) / 3904, 716, 3285,
376 DATA ( mm( 124, j ), j = 1, 4 ) / 2774, 1842, 2046,
378 DATA ( mm( 125, j ), j = 1, 4 ) / 997, 3987, 2107,
380 DATA ( mm( 126, j ), j = 1, 4 ) / 2573, 1368, 3508,
382 DATA ( mm( 127, j ), j = 1, 4 ) / 1148, 1848, 3525,
384 DATA ( mm( 128, j ), j = 1, 4 ) / 545, 2366, 3801,
394 DO 10 i = 1, min( n, lv )
403 it3 = it3 + i3*mm( i, 4 ) + i4*mm( i, 3 )
406 it2 = it2 + i2*mm( i, 4 ) + i3*mm( i, 3 ) + i4*mm( i, 2 )
409 it1 = it1 + i1*mm( i, 4 ) + i2*mm( i, 3 ) + i3*mm( i, 2 ) +
411 it1 = mod( it1, ipw2 )
415 x( i ) = r*(
REAL( it1 )+R*(
REAL( it2 )+r*(
REAL( it3 )+r*
418 IF (x( i ).EQ.1.0)
THEN
subroutine slaruv(ISEED, N, X)
SLARUV returns a vector of n random real numbers from a uniform distribution.