Skip to content

Commit abf7047

Browse files
committed
#291-fix erroneous period value for CWG algorithms everywhere
Fixed.
1 parent f30f4bc commit abf7047

File tree

36 files changed

+198
-198
lines changed

36 files changed

+198
-198
lines changed

Python3.10/PyRandLib/basecwg.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ class BaseCWG( BaseRandom ):
4747
implemented version. See implementation classes to get their formal
4848
description.
4949
50-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
50+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5151
with low computation time, medium period, 64- bits output values and very
5252
good randomness characteristics.
5353
54-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period CW-Generator
54+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5555
with very low computation time, medium period, 64-bits output values and
5656
very good randomness characteristics.
5757
58-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period CW-generator
58+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period CW-generator
5959
with very low computation time, medium period, 64- bits output values and
6060
very good randomness characteristics.
6161
@@ -71,9 +71,9 @@ class BaseCWG( BaseRandom ):
7171
7272
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7373
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
74-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
75-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
76-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
74+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
75+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
76+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
7777
7878
* _small crush_ is a small set of simple tests that quickly tests some of
7979
the expected characteristics for a pretty good PRNG;

Python3.10/PyRandLib/baserandom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class BaseRandom( Random ):
3434
3535
Copyright (c) 2016-2025 Philippe Schmouker
3636
37-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period Collatz-Weyl Generator
37+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period Collatz-Weyl Generator
3838
with low computation time, medium period, 64- bits output values and very good
3939
randomness characteristics.
40-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period C-W Generator with
40+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period C-W Generator with
4141
with very low computation time, medium period, 64-bits output values and very
4242
good randomness characteristics.
43-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period C-W generator with
43+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period C-W generator with
4444
very low computation time, medium period, 64- bits output values and very good
4545
randomness characteristics.
4646

Python3.10/PyRandLib/cwg128.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Cwg128( BaseCWG ):
3333
"""
3434
Pseudo-random numbers generator - Collatz-Weyl pseudo-random Generators
3535
dedicated to 128-bits calculations and 128-bits output values with large
36-
period (min 2^135, i.e. 4.36e+40) but short computation time. All CWG
36+
period (min 2^128, i.e. 6.81e+38) but short computation time. All CWG
3737
algorithms offer multi streams features, by simply using different initial
3838
settings for control value 's' - see below.
3939
@@ -56,11 +56,11 @@ class Cwg128( BaseCWG ):
5656
It appears that these value are used just are 's' for c[0], 'x' for c[1],
5757
'a' for c[2] and 'weyl' for c[3] in the other versions of the algorithm.
5858
59-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
59+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
6060
with very low computation time, medium period, 64- bits output values and
6161
very good randomness characteristics.
6262
63-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period CW-Generator
63+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
6464
with very low computation time, medium period, 64-bits output values and
6565
very good randomness characteristics.
6666
@@ -76,9 +76,9 @@ class Cwg128( BaseCWG ):
7676
7777
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7878
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
79-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
80-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
81-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
79+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
80+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
81+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
8282
8383
* _small crush_ is a small set of simple tests that quickly tests some of
8484
the expected characteristics for a pretty good PRNG;

Python3.10/PyRandLib/cwg128_64.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Cwg128_64( BaseCWG ):
3333
"""
3434
Pseudo-random numbers generator - Collatz-Weyl pseudorandom Generator
3535
dedicated to 128-bits calculations and 64-bits output values with small
36-
period (min 2^71, i.e. 2.36e+21) but short computation time. All CWG
36+
period (min 2^64, i.e. 1.84e+19) but short computation time. All CWG
3737
algorithms offer multi streams features, by simply using different initial
3838
settings for control value 's' - see below.
3939
@@ -52,11 +52,11 @@ class Cwg128_64( BaseCWG ):
5252
PRNG. 's' must be initally odd. 'a', 'weyl' and initial state 'x' may be
5353
initialized each with any 64-bits value.
5454
55-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
55+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5656
with very low computation time, medium period, 64 bits output values and
5757
very good randomness characteristics.
5858
59-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period CW-generator
59+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period CW-generator
6060
with very low computation time, medium period, 128 bits output values and
6161
very good randomness characteristics.
6262
@@ -72,9 +72,9 @@ class Cwg128_64( BaseCWG ):
7272
7373
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7474
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
75-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
76-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
77-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
75+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
76+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
77+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
7878
7979
* _small crush_ is a small set of simple tests that quickly tests some of
8080
the expected characteristics for a pretty good PRNG;

Python3.10/PyRandLib/cwg64.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Cwg64( BaseCWG ):
3333
"""
3434
Pseudo-random numbers generator - Collatz-Weyl pseudorandom Generator
3535
dedicated to 64-bits calculations and 64-bits output values with small
36-
period (min 2^70, i.e. 1.18e+21) but short computation time. All CWG
36+
period (min 2^64, i.e. 1.84e+19) but short computation time. All CWG
3737
algorithms offer multi streams features, by simply using different initial
3838
settings for control value 's' - see below.
3939
@@ -52,11 +52,11 @@ class Cwg64( BaseCWG ):
5252
PRNG. 's' must be initally odd. 'a', 'weyl' and initial state 'x' may be
5353
initialized each with any 64-bits value.
5454
55-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period CW-Generator
55+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5656
with very low computation time, medium period, 64-bits output values and
5757
very good randomness characteristics.
5858
59-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period CW-generator
59+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period CW-generator
6060
with very low computation time, medium period, 64- bits output values and
6161
very good randomness characteristics.
6262
@@ -72,9 +72,9 @@ class Cwg64( BaseCWG ):
7272
7373
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7474
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
75-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
76-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
77-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
75+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
76+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
77+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
7878
7979
* _small crush_ is a small set of simple tests that quickly tests some of
8080
the expected characteristics for a pretty good PRNG;

Python3.11/PyRandLib/basecwg.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ class BaseCWG( BaseRandom ):
4747
implemented version. See implementation classes to get their formal
4848
description.
4949
50-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
50+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5151
with low computation time, medium period, 64- bits output values and very
5252
good randomness characteristics.
5353
54-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period CW-Generator
54+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5555
with very low computation time, medium period, 64-bits output values and
5656
very good randomness characteristics.
5757
58-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period CW-generator
58+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period CW-generator
5959
with very low computation time, medium period, 64- bits output values and
6060
very good randomness characteristics.
6161
@@ -71,9 +71,9 @@ class BaseCWG( BaseRandom ):
7171
7272
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7373
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
74-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
75-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
76-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
74+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
75+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
76+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
7777
7878
* _small crush_ is a small set of simple tests that quickly tests some of
7979
the expected characteristics for a pretty good PRNG;

Python3.11/PyRandLib/baserandom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class BaseRandom( Random ):
3434
3535
Copyright (c) 2016-2025 Philippe Schmouker
3636
37-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period Collatz-Weyl Generator
37+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period Collatz-Weyl Generator
3838
with low computation time, medium period, 64- bits output values and very good
3939
randomness characteristics.
40-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period C-W Generator with
40+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period C-W Generator with
4141
with very low computation time, medium period, 64-bits output values and very
4242
good randomness characteristics.
43-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period C-W generator with
43+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period C-W generator with
4444
very low computation time, medium period, 64- bits output values and very good
4545
randomness characteristics.
4646

Python3.11/PyRandLib/cwg128.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Cwg128( BaseCWG ):
3333
"""
3434
Pseudo-random numbers generator - Collatz-Weyl pseudo-random Generators
3535
dedicated to 128-bits calculations and 128-bits output values with large
36-
period (min 2^135, i.e. 4.36e+40) but short computation time. All CWG
36+
period (min 2^128, i.e. 6.81e+38) but short computation time. All CWG
3737
algorithms offer multi streams features, by simply using different initial
3838
settings for control value 's' - see below.
3939
@@ -56,11 +56,11 @@ class Cwg128( BaseCWG ):
5656
It appears that these value are used just are 's' for c[0], 'x' for c[1],
5757
'a' for c[2] and 'weyl' for c[3] in the other versions of the algorithm.
5858
59-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
59+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
6060
with very low computation time, medium period, 64- bits output values and
6161
very good randomness characteristics.
6262
63-
See Cwg128_64 for a minimum 2^71 (i.e. about 2.36e+21) period CW-Generator
63+
See Cwg128_64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
6464
with very low computation time, medium period, 64-bits output values and
6565
very good randomness characteristics.
6666
@@ -76,9 +76,9 @@ class Cwg128( BaseCWG ):
7676
7777
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7878
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
79-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
80-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
81-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
79+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
80+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
81+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
8282
8383
* _small crush_ is a small set of simple tests that quickly tests some of
8484
the expected characteristics for a pretty good PRNG;

Python3.11/PyRandLib/cwg128_64.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Cwg128_64( BaseCWG ):
3333
"""
3434
Pseudo-random numbers generator - Collatz-Weyl pseudorandom Generator
3535
dedicated to 128-bits calculations and 64-bits output values with small
36-
period (min 2^71, i.e. 2.36e+21) but short computation time. All CWG
36+
period (min 2^64, i.e. 1.84e+19) but short computation time. All CWG
3737
algorithms offer multi streams features, by simply using different initial
3838
settings for control value 's' - see below.
3939
@@ -52,11 +52,11 @@ class Cwg128_64( BaseCWG ):
5252
PRNG. 's' must be initally odd. 'a', 'weyl' and initial state 'x' may be
5353
initialized each with any 64-bits value.
5454
55-
See Cwg64 for a minimum 2^70 (i.e. about 1.18e+21) period CW-Generator
55+
See Cwg64 for a minimum 2^64 (i.e. about 1.84e+19) period CW-Generator
5656
with very low computation time, medium period, 64 bits output values and
5757
very good randomness characteristics.
5858
59-
See Cwg128 for a minimum 2^135 (i.e. about 4.36e+40) period CW-generator
59+
See Cwg128 for a minimum 2^128 (i.e. about 6.81e+38) period CW-generator
6060
with very low computation time, medium period, 128 bits output values and
6161
very good randomness characteristics.
6262
@@ -72,9 +72,9 @@ class Cwg128_64( BaseCWG ):
7272
7373
| PyRandLib class | [8] generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
7474
| --------------- | ------------------ | ------------- | -------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
75-
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^70 | n.a. | n.a. | 0 | 0 | 0 |
76-
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^71 | n.a. | n.a. | 0 | 0 | 0 |
77-
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^135 | n.a. | n.a. | 0 | 0 | 0 |
75+
| Cwg64 | CWG64 | 8 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
76+
| Cwg128_64 | CWG128_64 | 10 x 4-bytes | >= 2^64 | n.a. | n.a. | 0 | 0 | 0 |
77+
| Cwg128 | CWG128 | 16 x 4-bytes | >= 2^128 | n.a. | n.a. | 0 | 0 | 0 |
7878
7979
* _small crush_ is a small set of simple tests that quickly tests some of
8080
the expected characteristics for a pretty good PRNG;

0 commit comments

Comments
 (0)