07-Jan-2022 23:16:42 niederreiter2_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test niederreiter2(). NIEDERREITER2_TEST01() SETFLD2 returns the addition, multiplication, and subtraction tables for base 2. Addition table: + 0 1 0 0 1 1 1 0 Multiplication table: * 0 1 0 0 0 1 0 1 Subtraction table: - 0 1 0 0 1 1 1 0 NIEDERREITER2_TEST02 PLYMUL2 computes the product of two polynomials base 2. Polynomial A: 0 1 1 0 2 1 Polynomial B: 0 1 1 1 Polynomial C: 0 1 1 1 2 1 3 1 NIEDERREITER2_TEST03 EXOR returns the exclusive OR of two integers. I J EXOR(I,J) 82 91 9 12 92 80 63 9 54 28 55 43 96 97 1 15 98 109 96 49 81 80 14 94 42 92 118 80 96 48 NIEDERREITER2_TEST04 NIEDERREITER2 computes the next element of a Niederreiter quasirandom sequence using base 2. In this test, we call NIEDERREITER2 repeatedly. Using dimension DIM_NUM = 2 key key Niederreiter2 In Out 0 1 0.000000 0.000000 1 2 0.500000 0.500000 2 3 0.750000 0.250000 3 4 0.250000 0.750000 4 5 0.375000 0.375000 5 6 0.875000 0.875000 6 7 0.625000 0.125000 7 8 0.125000 0.625000 8 9 0.187500 0.312500 9 10 0.687500 0.812500 10 11 0.937500 0.062500 11 12 0.437500 0.562500 ...................... 95 96 0.054688 0.929688 96 97 0.039062 0.132812 97 98 0.539062 0.632812 98 99 0.789062 0.382812 99 100 0.289062 0.882812 100 101 0.414062 0.257812 101 102 0.914062 0.757812 102 103 0.664062 0.007812 103 104 0.164062 0.507812 104 105 0.226562 0.445312 105 106 0.726562 0.945312 106 107 0.976562 0.195312 107 108 0.476562 0.695312 108 109 0.351562 0.070312 109 110 0.851562 0.570312 110 111 0.601562 0.320312 Using dimension DIM_NUM = 3 key key Niederreiter2 In Out 0 1 0.000000 0.000000 0.000000 1 2 0.500000 0.500000 0.750000 2 3 0.750000 0.250000 0.312500 3 4 0.250000 0.750000 0.562500 4 5 0.375000 0.375000 0.875000 5 6 0.875000 0.875000 0.125000 6 7 0.625000 0.125000 0.687500 7 8 0.125000 0.625000 0.437500 8 9 0.187500 0.312500 0.515625 9 10 0.687500 0.812500 0.265625 10 11 0.937500 0.062500 0.828125 11 12 0.437500 0.562500 0.078125 ...................... 95 96 0.054688 0.929688 0.101562 96 97 0.039062 0.132812 0.464844 97 98 0.539062 0.632812 0.714844 98 99 0.789062 0.382812 0.152344 99 100 0.289062 0.882812 0.902344 100 101 0.414062 0.257812 0.589844 101 102 0.914062 0.757812 0.339844 102 103 0.664062 0.007812 0.777344 103 104 0.164062 0.507812 0.027344 104 105 0.226562 0.445312 0.949219 105 106 0.726562 0.945312 0.199219 106 107 0.976562 0.195312 0.636719 107 108 0.476562 0.695312 0.386719 108 109 0.351562 0.070312 0.074219 109 110 0.851562 0.570312 0.824219 110 111 0.601562 0.320312 0.261719 Using dimension DIM_NUM = 4 key key Niederreiter2 In Out 0 1 0.000000 0.000000 0.000000 0.000000 1 2 0.500000 0.500000 0.750000 0.875000 2 3 0.750000 0.250000 0.312500 0.140625 3 4 0.250000 0.750000 0.562500 0.765625 4 5 0.375000 0.375000 0.875000 0.281250 5 6 0.875000 0.875000 0.125000 0.656250 6 7 0.625000 0.125000 0.687500 0.421875 7 8 0.125000 0.625000 0.437500 0.546875 8 9 0.187500 0.312500 0.515625 0.687500 9 10 0.687500 0.812500 0.265625 0.312500 10 11 0.937500 0.062500 0.828125 0.578125 11 12 0.437500 0.562500 0.078125 0.453125 ...................... 95 96 0.054688 0.929688 0.101562 0.509766 96 97 0.039062 0.132812 0.464844 0.214844 97 98 0.539062 0.632812 0.714844 0.839844 98 99 0.789062 0.382812 0.152344 0.074219 99 100 0.289062 0.882812 0.902344 0.949219 100 101 0.414062 0.257812 0.589844 0.496094 101 102 0.914062 0.757812 0.339844 0.621094 102 103 0.664062 0.007812 0.777344 0.355469 103 104 0.164062 0.507812 0.027344 0.730469 104 105 0.226562 0.445312 0.949219 0.527344 105 106 0.726562 0.945312 0.199219 0.402344 106 107 0.976562 0.195312 0.636719 0.636719 107 108 0.476562 0.695312 0.386719 0.261719 108 109 0.351562 0.070312 0.074219 0.808594 109 110 0.851562 0.570312 0.824219 0.183594 110 111 0.601562 0.320312 0.261719 0.917969 NIEDERREITER2_TEST05 NIEDERREITER2 computes the next element of a Niederreiter quasirandom sequence using base 2. In this test, we demonstrate how the key can be manipulated to skip ahead in the sequence, or to come back to any part of the sequence. Using dimension DIM_NUM = 3 key key Niederreiter2 In Out 0 1 0.000000 0.000000 0.000000 1 2 0.500000 0.500000 0.750000 2 3 0.750000 0.250000 0.312500 3 4 0.250000 0.750000 0.562500 4 5 0.375000 0.375000 0.875000 5 6 0.875000 0.875000 0.125000 6 7 0.625000 0.125000 0.687500 7 8 0.125000 0.625000 0.437500 8 9 0.187500 0.312500 0.515625 9 10 0.687500 0.812500 0.265625 10 11 0.937500 0.062500 0.828125 Jump ahead by increasing key: key key Niederreiter2 In Out 100 101 0.414062 0.257812 0.589844 101 102 0.914062 0.757812 0.339844 102 103 0.664062 0.007812 0.777344 103 104 0.164062 0.507812 0.027344 104 105 0.226562 0.445312 0.949219 Jump back by decreasing key: key key Niederreiter2 In Out 3 4 0.250000 0.750000 0.562500 4 5 0.375000 0.375000 0.875000 5 6 0.875000 0.875000 0.125000 6 7 0.625000 0.125000 0.687500 7 8 0.125000 0.625000 0.437500 8 9 0.187500 0.312500 0.515625 9 10 0.687500 0.812500 0.265625 10 11 0.937500 0.062500 0.828125 11 12 0.437500 0.562500 0.078125 12 13 0.312500 0.187500 0.390625 13 14 0.812500 0.687500 0.640625 Jump ahead by increasing key: key key Niederreiter2 In Out 98 99 0.789062 0.382812 0.152344 99 100 0.289062 0.882812 0.902344 100 101 0.414062 0.257812 0.589844 101 102 0.914062 0.757812 0.339844 102 103 0.664062 0.007812 0.777344 niederreiter2_test(): Normal end of execution. 07-Jan-2022 23:16:42