29 December 2014 09:31:29 AM UNIFORM_PRB C++ version: Test the UNIFORM library. BVEC_UNIFORM_NEW_TEST BVEC_UNIFORM_NEW computes a binary vector. The initial seed is 123456789 1000111110 1110010111 0011101101 0001001011 0101101100 1010010001 0010111011 1111110001 0010000111 0011000101 C4_UNIFORM_01_TEST C4_UNIFORM_01 computes pseudorandom complex values uniformly distributed in the unit circle. The initial seed is 123456789 1 0.44986 -0.126667 2 -0.843197 -0.34428 3 0.589627 0.26009 4 0.39114 0.3234 5 -0.139466 -0.156136 6 -0.236066 0.0774594 7 0.0185991 -0.633214 8 0.89285 0.0103136 9 -0.560465 0.763795 10 0.306357 0.0262752 C4MAT_UNIFORM_01_NEW_TEST C4MAT_UNIFORM_01_NEW computes pseudorandom complex values uniformly distributed in the unit circle. The initial seed is 123456789 Uniform C4MAT: Col: 1 2 Row --- 1: 0.44986 -0.126667 -0.236066 0.0774594 2: -0.843197 -0.34428 0.0185991 -0.633214 3: 0.589627 0.26009 0.89285 0.0103136 4: 0.39114 0.3234 -0.560465 0.763795 5: -0.139466 -0.156136 0.306357 0.0262752 C4VEC_UNIFORM_01_NEW_TEST C4VEC_UNIFORM_01_NEW computes pseudorandom complex values uniformly distributed in the unit circle. The initial seed is 123456789 Uniform C4VEC: 0: 0.44986 -0.126667 1: -0.843197 -0.34428 2: 0.589627 0.26009 3: 0.39114 0.3234 4: -0.139466 -0.156136 5: -0.236066 0.0774594 6: 0.0185991 -0.633214 7: 0.89285 0.0103136 8: -0.560465 0.763795 9: 0.306357 0.0262752 C8_UNIFORM_01_TEST C8_UNIFORM_01 computes pseudorandom C8 values uniformly distributed in the unit circle. The initial seed is 123456789 1 0.44986 -0.126667 2 -0.843197 -0.34428 3 0.589627 0.26009 4 0.39114 0.3234 5 -0.139466 -0.156136 6 -0.236066 0.0774593 7 0.0185993 -0.633214 8 0.89285 0.0103136 9 -0.560465 0.763795 10 0.306357 0.0262752 C8MAT_UNIFORM_01_NEW_TEST C8MAT_UNIFORM_01_NEW computes pseudorandom complex values uniformly distributed in the unit circle. The initial seed is 123456789 Uniform C8MAT: Col: 1 2 Row --- 1: 0.44986 -0.126667 -0.236066 0.0774593 2: -0.843197 -0.34428 0.0185993 -0.633214 3: 0.589627 0.26009 0.89285 0.0103136 4: 0.39114 0.3234 -0.560465 0.763795 5: -0.139466 -0.156136 0.306357 0.0262752 C8VEC_UNIFORM_01_NEW_TEST C8VEC_UNIFORM_01_NEW computes pseudorandom C8 values uniformly distributed in the unit circle. The initial seed is 123456789 Uniform C8VEC: 0: 0.44986 -0.126667 1: -0.843197 -0.34428 2: 0.589627 0.26009 3: 0.39114 0.3234 4: -0.139466 -0.156136 5: -0.236066 0.0774593 6: 0.0185993 -0.633214 7: 0.89285 0.0103136 8: -0.560465 0.763795 9: 0.306357 0.0262752 CH_UNIFORM_AB_TEST CH_UNIFORM_AB computes pseudorandom characters in an interval [CLO,CHI]. The lower endpoint CLO = 'A'. The upper endpoint CHI = 'J'. The initial seed is 123456789 1 'C' 2 'J' 3 'I' 4 'F' 5 'E' 6 'A' 7 'C' 8 'B' 9 'A' 10 'G' GET_SEED_TEST GET_SEED picks an initial seed value for R8_UNIFORM_01. The value chosen should vary over time, because the seed is based on reading the clock. This is just the "calendar" clock, which does not change very fast, so calling GET_SEED several times in a row may result in the same value. Initial seed is 12345678 Next 3 values of R8_UNIFORM_01: 0.621835 0.177248 0.00290613 New seed from GET_SEED is 1525608174 Next 3 values of R8_UNIFORM_01: 0.972915 0.781095 0.858646 Oops! Same seed returned for 10000 calls to GET_SEED! Could be a bad algorithm, slow clock, or fast machine! To avoid infinite loops, we take what we have now. New seed from GET_SEED is 1525608174 Next 3 values of R8_UNIFORM_01: 0.972915 0.781095 0.858646 Oops! Same seed returned for 100000 calls to GET_SEED! Could be a bad algorithm, slow clock, or fast machine! To avoid infinite loops, we take what we have now. New seed from GET_SEED is 1525608174 Next 3 values of R8_UNIFORM_01: 0.972915 0.781095 0.858646 New seed from GET_SEED is 1525657884 Next 3 values of R8_UNIFORM_01: 0.361964 0.524543 0.999213 I4_SEED_ADVANCE_TEST I4_SEED_ADVANCE advances the seed. Step SEED input SEED output 1 12345 207482415 2 207482415 1790989824 3 1790989824 2035175616 4 2035175616 77048696 5 77048696 24794531 6 24794531 109854999 7 109854999 1644515420 8 1644515420 1256127050 9 1256127050 1963079340 10 1963079340 1683198519 I4_UNIFORM_0I_TEST I4_UNIFORM_0I samples a uniform random integer distribution in [0,2**31-1]. Starting with seed = 123456789 First few values: 0 469049721 1 2053676357 2 1781357515 3 1206231778 4 891865166 Number of values computed was N = 1000 Average value was 1.08027e+09 Minimum value was 3947872 Maximum value was 2142991809 Variance was 3.79689e+17 I4_UNIFORM_AB_TEST I4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 1 -35 2 187 3 149 4 69 5 25 6 -81 7 -23 8 -67 9 -87 10 90 11 -82 12 35 13 20 14 127 15 139 16 -100 17 170 18 5 19 -72 20 -96 I4MAT_UNIFORM_AB_NEW_TEST I4MAT_UNIFORM_AB_NEW computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 Uniform I4MAT: Col: 0 1 2 3 Row 0: -35 -81 -82 -100 1: 187 -23 35 170 2: 149 -67 20 5 3: 69 -87 127 -72 4: 25 90 139 -96 I4VEC_UNIFORM_AB_NEW_TEST I4VEC_UNIFORM_AB_NEW computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 Uniform I4VEC: 0: -35 1: 187 2: 149 3: 69 4: 25 5: -81 6: -23 7: -67 8: -87 9: 90 10: -82 11: 35 12: 20 13: 127 14: 139 15: -100 16: 170 17: 5 18: -72 19: -96 L4_UNIFORM_TEST L4_UNIFORM computes pseudorandom logical values. The initial seed is 123456789 1 0 2 1 3 1 4 1 5 0 6 0 7 0 8 0 9 0 10 1 L4MAT_UNIFORM_NEW_TEST L4MAT_UNIFORM_NEW computes a vector of pseudorandom logical values. The initial seed is 123456789 Uniform L4MAT: Col 0 1 2 3 Row 0: 0 0 0 0 1: 1 0 0 1 2: 1 0 0 0 3: 1 0 1 0 4: 0 1 1 0 L4VEC_UNIFORM_NEW_TEST L4VEC_UNIFORM_NEW computes a vector of pseudorandom logical values. The initial seed is 123456789 Uniform L4VEC: 0: 0 1: 1 2: 1 3: 1 4: 0 5: 0 6: 0 7: 0 8: 0 9: 1 LCRG_ANBN_TEST LCRG_ANBN determines a linear congruential random number generator equivalent to N steps of a given one. LCRG parameters: A = 16807 B = 0 C = 2147483647 N A B 0 1 0 1 16807 0 2 282475249 0 3 1622650073 0 4 984943658 0 5 1144108930 0 6 470211272 0 7 101027544 0 8 1457850878 0 9 1458777923 0 10 2007237709 0 N In Out 0 12345 1 12345 207482415 2 207482415 1790989824 3 1790989824 2035175616 4 2035175616 77048696 5 77048696 24794531 6 24794531 109854999 7 109854999 1644515420 8 1644515420 1256127050 9 1256127050 1963079340 10 1963079340 1683198519 11 1683198519 715426902 LCRG parameters: AN = 984943658 BN = 0 C = 2147483647 J N In Out 1 0 12345 2 1 207482415 3 2 1790989824 4 3 2035175616 1 4 12345 77048696 2 5 207482415 24794531 3 6 1790989824 109854999 4 7 2035175616 1644515420 1 8 77048696 1256127050 2 9 24794531 1963079340 3 10 109854999 1683198519 4 11 1644515420 715426902 LCRG_SEED_TEST LCRG_SEED directly computes the updated value of a seed used by an linear congruential random number generator. I SEED SEED SEED U Input Output LCRG 1 12345 207482415 207482415 0.0966165 2 207482415 1790989824 1790989824 0.833995 3 1790989824 2035175616 2035175616 0.947703 4 2035175616 77048696 77048696 0.0358786 5 77048696 24794531 24794531 0.0115459 6 24794531 109854999 109854999 0.0511552 7 109854999 1644515420 1644515420 0.765787 8 1644515420 1256127050 1256127050 0.58493 9 1256127050 1963079340 1963079340 0.91413 10 1963079340 1683198519 1683198519 0.7838 100 1549894482 99920864 99920864 0.0465293 1000 890151694 1408436056 1408436056 0.655854 R4_UNIFORM_01_TEST R4_UNIFORM_01 computes pseudorandom values in the interval [0,1]. The initial seed is 123456789 1 0.218418 2 0.956318 3 0.829509 4 0.561695 5 0.415307 6 0.0661187 7 0.257578 8 0.109957 9 0.043829 10 0.633966 R4_UNIFORM_AB_TEST R4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = 5 The upper endpoint B = 10 The initial seed is 123456789 1 6.09209 2 9.78159 3 9.14755 4 7.80848 5 7.07654 6 5.33059 7 6.28789 8 5.54978 9 5.21914 10 8.16983 R4MAT_UNIFORM_AB_NEW_TEST R4MAT_UNIFORM_AB_NEW computes pseudorandom values in an interval [A,B]. The lower endpoint A = -5 The upper endpoint B = 10 The initial seed is 123456789 Uniform R4MAT: Col: 0 1 2 3 Row 0: -1.72373 -4.00822 -4.07409 -4.97242 1: 9.34476 -1.13633 1.74308 8.46256 2: 7.44264 -3.35065 1.01959 0.261285 3: 3.42543 -4.34257 6.3201 -3.58183 4: 1.22961 4.50949 6.9593 -4.79575 R4VEC_UNIFORM_AB_NEW_TEST R4VEC_UNIFORM_AB_NEW computes pseudorandom values in an interval [A,B]. The lower endpoint A = -5 The upper endpoint B = 10 The initial seed is 123456789 Uniform R4VEC: 0: -1.72373 1: 9.34476 2: 7.44264 3: 3.42543 4: 1.22961 5: -4.00822 6: -1.13633 7: -3.35065 8: -4.34257 9: 4.50949 10: -4.07409 11: 1.74308 12: 1.01959 13: 6.3201 14: 6.9593 15: -4.97242 16: 8.46256 17: 0.261285 18: -3.58183 19: -4.79575 R8_UNIFORM_01_TEST R8_UNIFORM_01 computes pseudorandom values in the interval [0,1]. The initial seed is 123456789 1 0.218418 2 0.956318 3 0.829509 4 0.561695 5 0.415307 6 0.0661187 7 0.257578 8 0.109957 9 0.043829 10 0.633966 R8_UNIFORM_AB_TEST R8_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = 5 The upper endpoint B = 10 The initial seed is 123456789 1 6.09209 2 9.78159 3 9.14755 4 7.80848 5 7.07654 6 5.33059 7 6.28789 8 5.54978 9 5.21914 10 8.16983 R8MAT_UNIFORM_AB_NEW_TEST R8MAT_UNIFORM_AB_NEW computes pseudorandom values in an interval [A,B]. The lower endpoint A = -5 The upper endpoint B = 10 The initial seed is 123456789 Uniform R8MAT: Col: 0 1 2 3 Row 0: -1.72373 -4.00822 -4.07409 -4.97242 1: 9.34476 -1.13633 1.74308 8.46256 2: 7.44264 -3.35065 1.01959 0.261285 3: 3.42543 -4.34257 6.3201 -3.58183 4: 1.22961 4.50949 6.9593 -4.79575 R8VEC_UNIFORM_01_NEW_TEST R8VEC_UNIFORM_01_NEW computes a random R8VEC. Initial seed is 123456789 Uniform R8VEC: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 6: 0.257578 7: 0.109957 8: 0.043829 9: 0.633966 R8VEC_UNIFORM_AB_NEW_TEST R8VEC_UNIFORM_AB_NEW computes a random R8VEC. -1 <= X <= 5 Initial seed is 123456789 Uniform R8VEC: 0: 0.31051 1: 4.73791 2: 3.97706 3: 2.37017 4: 1.49184 5: -0.603288 6: 0.545467 7: -0.340259 8: -0.737026 9: 2.80379 R8COL_UNIFORM_ABVEC_NEW_TEST R8COL_UNIFORM_ABVEC_NEW computes a random R8COL. Initial seed is 123456789 0 0: 0.218418 0.0661187 0.0617272 0.00183837 : 1 1 0.2: 0.247816 0.212879 0.222477 0.244875 : 0.25 2 10: 18.2951 11.0996 14.0131 13.5075 : 20 3 52: 53.1234 52.0877 53.5093 52.1891 : 54 4 -1: -0.169386 0.267931 0.594574 -0.972766 : 1 R8ROW_UNIFORM_ABVEC_NEW_TEST R8ROW_UNIFORM_ABVEC_NEW computes a random R8ROW. Initial seed is 123456789 1 0.25 20 54 1 0.218418 0.247816 18.2951 53.1234 -0.169386 0.0661187 0.212879 11.0996 52.0877 0.267931 0.0617272 0.222477 14.0131 53.5093 0.594574 0.00183837 0.244875 13.5075 52.1891 -0.972766 0 0.2 10 52 -1 R8VEC_UNIFORM_ABVEC_NEW_TEST R8VEC_UNIFORM_ABVEC_NEW computes a random R8VEC. Initial seed is 123456789 I A X B 0 0 0.218418 1 1 0.2 0.247816 0.25 2 10 18.2951 20 3 52 53.1234 54 4 -1 -0.169386 1 UNIFORM_PRB Normal end of execution. 29 December 2014 09:31:30 AM