Skip to content

Instantly share code, notes, and snippets.

@flyingmutant
Created August 1, 2022 22:11
Show Gist options
  • Save flyingmutant/0b380f432308beaaf09c0a038f918aa4 to your computer and use it in GitHub Desktop.
Save flyingmutant/0b380f432308beaaf09c0a038f918aa4 to your computer and use it in GitHub Desktop.
Testing Go's golang.org/x/exp/rand with PractRand (using https://github.com/flyingmutant/rand/tree/master/misc/practrand)
> ./practrand -gen=x -transform=exp | PractRand stdin64 -multithreaded
RNG_test using PractRand version 0.95
RNG = RNG_stdin64, seed = unknown
test set = core, folding = standard (64 bit)
rng=RNG_stdin64, seed=unknown
length= 256 megabytes (2^28 bytes), time= 3.0 seconds
Test Name Raw Processed Evaluation
BCFN(2+3,13-3,T) R= -8.3 p =1-9.6e-5 unusual
...and 212 test result(s) without anomalies
rng=RNG_stdin64, seed=unknown
length= 512 megabytes (2^29 bytes), time= 6.9 seconds
no anomalies in 229 test result(s)
rng=RNG_stdin64, seed=unknown
length= 1 gigabyte (2^30 bytes), time= 13.3 seconds
Test Name Raw Processed Evaluation
FPF-14+6/16:all R= +6.3 p = 2.2e-5 mildly suspicious
...and 245 test result(s) without anomalies
rng=RNG_stdin64, seed=unknown
length= 2 gigabytes (2^31 bytes), time= 24.8 seconds
Test Name Raw Processed Evaluation
FPF-14+6/16:(4,14-0) R= +7.8 p = 8.2e-7 mildly suspicious
FPF-14+6/16:all R= +13.4 p = 5.1e-12 FAIL
[Low16/64]FPF-14+6/16:(0,14-0) R= +7.4 p = 2.0e-6 unusual
[Low16/64]FPF-14+6/16:(1,14-0) R= +8.2 p = 3.5e-7 mildly suspicious
[Low16/64]FPF-14+6/16:all R= +9.6 p = 1.9e-8 very suspicious
...and 258 test result(s) without anomalies
> ./practrand -gen=x -transform=norm | PractRand stdin64 -multithreaded
RNG_test using PractRand version 0.95
RNG = RNG_stdin64, seed = unknown
test set = core, folding = standard (64 bit)
rng=RNG_stdin64, seed=unknown
length= 256 megabytes (2^28 bytes), time= 3.2 seconds
no anomalies in 213 test result(s)
rng=RNG_stdin64, seed=unknown
length= 512 megabytes (2^29 bytes), time= 7.2 seconds
Test Name Raw Processed Evaluation
[Low16/64]FPF-14+6/16:all R= +5.1 p = 3.0e-4 unusual
...and 228 test result(s) without anomalies
rng=RNG_stdin64, seed=unknown
length= 1 gigabyte (2^30 bytes), time= 14.4 seconds
Test Name Raw Processed Evaluation
[Low16/64]FPF-14+6/16:all R= +7.7 p = 1.1e-6 suspicious
...and 245 test result(s) without anomalies
rng=RNG_stdin64, seed=unknown
length= 2 gigabytes (2^31 bytes), time= 27.6 seconds
Test Name Raw Processed Evaluation
FPF-14+6/16:all R= +6.8 p = 7.1e-6 mildly suspicious
[Low16/64]FPF-14+6/16:(0,14-0) R= +7.8 p = 8.2e-7 mildly suspicious
[Low16/64]FPF-14+6/16:(1,14-0) R= +9.1 p = 4.8e-8 suspicious
[Low16/64]FPF-14+6/16:all R= +11.4 p = 3.6e-10 VERY SUSPICIOUS
...and 259 test result(s) without anomalies
rng=RNG_stdin64, seed=unknown
length= 4 gigabytes (2^32 bytes), time= 52.2 seconds
Test Name Raw Processed Evaluation
FPF-14+6/16:(1,14-0) R= +9.0 p = 6.3e-8 suspicious
FPF-14+6/16:(2,14-0) R= +6.7 p = 8.5e-6 unusual
FPF-14+6/16:(4,14-0) R= +6.7 p = 8.3e-6 unusual
FPF-14+6/16:(5,14-0) R= +9.2 p = 3.7e-8 suspicious
FPF-14+6/16:(6,14-0) R= +7.6 p = 1.3e-6 mildly suspicious
FPF-14+6/16:(7,14-0) R= +7.0 p = 4.2e-6 unusual
FPF-14+6/16:all R= +22.3 p = 2.1e-20 FAIL !!
[Low16/64]FPF-14+6/16:(0,14-0) R= +14.9 p = 1.9e-13 FAIL
[Low16/64]FPF-14+6/16:(1,14-0) R= +16.4 p = 8.8e-15 FAIL
[Low16/64]FPF-14+6/16:(2,14-0) R= +8.2 p = 3.0e-7 mildly suspicious
[Low16/64]FPF-14+6/16:(3,14-0) R= +8.3 p = 2.6e-7 mildly suspicious
[Low16/64]FPF-14+6/16:all R= +20.0 p = 3.1e-18 FAIL !
...and 267 test result(s) without anomalies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment