Tue Oct 19 17:06:13 2021 randlc_test() Python version: 3.6.9 Test randlc(). randlc_test01 Python version: 3.6.9 randlc() computes pseudorandom values in the interval [0,1]. The initial seed is 1.23457e+08 I RANDLC 0 0.633901 1 0.557158 2 0.503282 3 0.586596 4 0.884073 5 0.165209 6 0.806692 7 0.701847 8 0.516941 9 0.61029 randlc_test01: Normal end of execution. randlc_test02 Python version: 3.6.9 randlc() computes a sequence of uniformly distributed pseudorandom numbers. Initial SEED = 1.23457e+08 First 10 values: I Input Output RANDLC SEED SEED 0 123456789 44606850387001 0.633901 1 44606850387001 39206478837805 0.557158 2 39206478837805 35415334725937 0.503282 3 35415334725937 41277992533125 0.586596 4 41277992533125 62211098720361 0.884073 5 62211098720361 11625570795549 0.165209 6 11625570795549 56765914126305 0.806692 7 56765914126305 49388124469493 0.701847 8 49388124469493 36376488146329 0.516941 9 36376488146329 42945314893069 0.610290 Now call RANDLC 1000 times. Average value = 0.499192 Expecting 0.5 Variance = 0.0858645 Expecting 0.0833333 randlc_test02: Normal end of execution. randlc_test03 Python version: 3.6.9 RANDLC computes a sequence of pseudorandom numbers but all computations depend on the seed value. In this test, we show how a sequence of "random" values can be manipulated by accessing the seed. Set SEED to 1066 Now call RANDLC 10 times, and watch SEED. I Input Output RANDLC SEED SEED 0 1066 1301269531250 0.018492 1 1301269531250 3119242644058 0.044327 2 3119242644058 29495326667874 0.419154 3 29495326667874 1664784089866 0.023658 4 1664784089866 30345277309650 0.431232 5 30345277309650 23978980768314 0.340762 6 23978980768314 48407130943938 0.687907 7 48407130943938 37388733848554 0.531326 8 37388733848554 31057455701298 0.441353 9 31057455701298 6439705293850 0.091514 Reset SEED to its value at step 5, = 1066 Now call RANDLC 10 times, and watch how SEED and RANDLC restart themselves. I Input Output RANDLC SEED SEED 0 1066 1301269531250 0.018492 1 1301269531250 3119242644058 0.044327 2 3119242644058 29495326667874 0.419154 3 29495326667874 1664784089866 0.023658 4 1664784089866 30345277309650 0.431232 5 30345277309650 23978980768314 0.340762 6 23978980768314 48407130943938 0.687907 7 48407130943938 37388733848554 0.531326 8 37388733848554 31057455701298 0.441353 9 31057455701298 6439705293850 0.091514 What happens with an initial zero SEED? I Input Output RANDLC SEED SEED 0 0 55909509111989 0.794522 1 55909509111989 61155031930969 0.869065 2 61155031930969 45573031421645 0.647632 3 45573031421645 55279057169489 0.785563 4 55279057169489 1250169187877 0.017766 5 1250169187877 27551538756233 0.391531 6 27551538756233 56099529399485 0.797222 7 56099529399485 28525870915841 0.405377 8 28525870915841 35461206354069 0.503934 9 35461206354069 34383163428281 0.488614 What happens with an initial negative SEED? I Input Output RANDLC SEED SEED 0 -123456789 44606850387001 0.633901 1 44606850387001 39206478837805 0.557158 2 39206478837805 35415334725937 0.503282 3 35415334725937 41277992533125 0.586596 4 41277992533125 62211098720361 0.884073 5 62211098720361 11625570795549 0.165209 6 11625570795549 56765914126305 0.806692 7 56765914126305 49388124469493 0.701847 8 49388124469493 36376488146329 0.516941 9 36376488146329 42945314893069 0.610290 randlc_test03: Normal end of execution. randlc_jump_test Python version: 3.6.9 randlc_jump jumps directly to the K-th value returned by RANDLC. K X(hard way) X(jump) 1 0.633901 0.633901 2 0.557158 0.557158 4 0.586596 0.586596 8 0.701847 0.701847 16 0.702661 0.702661 32 0.030668 0.030668 64 0.033047 0.033047 128 0.513648 0.513648 256 0.094226 0.094226 512 0.015067 0.015067 randlc_jump_test: Normal end of execution. randlc_test Normal end of execution. Tue Oct 19 17:06:13 2021