🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #217508

Re: Jak zrobić test za pomocą PractRand?

#217508
From: M.M.
Date: Sun, 22 Aug 2021 00:31
96 lines
7859 bytes
On Sunday, August 22, 2021 at 12:17:58 AM UTC+2, osobli...@gmail.com wrote:
> Swoją drogą program zadziałał po komendzie: 
> 
> python3 Mojgenerator.py | ./RNG_test stdin 
> 
> Ale znowu wystąpiły FAILE i ten sam błąd:
> RNG_test using PractRand version 0.93
> RNG = RNG_stdin, seed = 0xb223f1b6
> test set = normal, folding = standard(unknown format)
> rng=RNG_stdin, seed=0xb223f1b6 
> length= 128 megabytes (2^27 bytes), time= 3.3 seconds
> Test Name Raw Processed Evaluation
> BCFN(2+0,13-3,T) R=+17706724 p = 0 FAIL !!!!!!!! 
> BCFN(2+1,13-3,T) R=+8369402 p = 0 FAIL !!!!!!!! 
> BCFN(2+2,13-3,T) R=+4018669 p = 0 FAIL !!!!!!!! 
> BCFN(2+3,13-3,T) R=+1951923 p = 0 FAIL !!!!!!!! 
> BCFN(2+4,13-4,T) R=+1217378 p = 0 FAIL !!!!!!!! 
> BCFN(2+5,13-5,T) R=+754738 p = 0 FAIL !!!!!!!! 
> BCFN(2+6,13-5,T) R=+373439 p = 0 FAIL !!!!!!!! 
> BCFN(2+7,13-6,T) R=+229795 p = 0 FAIL !!!!!!!! 
> BCFN(2+8,13-6,T) R=+114286 p = 0 FAIL !!!!!!!! 
> BCFN(2+9,13-7,T) R=+69277 p = 0 FAIL !!!!!!!! 
> BCFN(2+10,13-8,T) R=+41033 p = 0 FAIL !!!!!!!! 
> BCFN(2+11,13-8,T) R=+20468 p = 1e-5195 FAIL !!!!!!!! 
> BCFN(2+12,13-9,T) R=+11745 p = 3e-2640 FAIL !!!!!!!! 
> BCFN(2+13,13-9,T) R= +5857 p = 4e-1317 FAIL !!!!!!!! 
> DC6-9x1Bytes-1 R=+7289719 p = 0 FAIL !!!!!!!! 
> Gap-16:A R=+3003944 p = 0 FAIL !!!!!!!! 
> Gap-16:B R=+15169911 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:(0,14-0) R=+4703480 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:(1,14-0) R=+79390 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:(4,14-2) R=+7118595 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:all R=+6490693 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:all2 R=+39503479195893 p = 0 FAIL !!!!!!!! 
> FPF-14+6/16:cross R=+28219067 p = 0 FAIL !!!!!!!! 
> BRank(12):128(4) R= +4256 p~= 2e-2264 FAIL !!!!!!!! 
> BRank(12):256(4) R= +8744 p~= 1e-4651 FAIL !!!!!!!! 
> BRank(12):384(1) R= +6353 p~= 2e-1913 FAIL !!!!!!!! 
> BRank(12):512(2) R=+12622 p~= 1e-3800 FAIL !!!!!!!! 
> BRank(12):768(1) R=+12316 p~= 2e-3708 FAIL !!!!!!!! 
> BRank(12):1K(2) R=+24891 p~= 5e-7494 FAIL !!!!!!!! 
> BRank(12):1536(1) R=+24672 p~= 4e-7428 FAIL !!!!!!!! 
> [Low1/8]BCFN(2+0,13-5,T) R= +9.8 p = 4.9e-4 unusual 
> [Low1/8]DC6-9x1Bytes-1 R= +50.0 p = 1.1e-28 FAIL !!! 
> [Low1/8]FPF-14+6/16:(0,14-1) R= +37.0 p = 1.4e-32 FAIL !!! 
> [Low1/8]FPF-14+6/16:(1,14-2) R= +25.8 p = 2.5e-22 FAIL !! 
> [Low1/8]FPF-14+6/16:(2,14-2) R= +15.9 p = 1.0e-13 FAIL 
> [Low1/8]FPF-14+6/16:(3,14-3) R= +7.9 p = 1.2e-6 mildly suspicious 
> [Low1/8]FPF-14+6/16:all R= +48.8 p = 2.7e-45 FAIL !!! 
> [Low1/8]FPF-14+6/16:all2 R=+504.6 p = 1.0e-174 FAIL !!!!!! 
> [Low1/8]FPF-14+6/16:cross R= +71.2 p = 2.2e-56 FAIL !!!! 
> [Low4/32]BCFN(2+0,13-5,T) R=+3546530 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+1,13-5,T) R=+1676322 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+2,13-5,T) R=+804897 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+3,13-5,T) R=+390941 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+4,13-6,T) R=+237394 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+5,13-6,T) R=+116954 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+6,13-7,T) R=+70419 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+7,13-8,T) R=+41511 p = 0 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+8,13-8,T) R=+20637 p = 2e-5238 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+9,13-9,T) R=+11814 p = 1e-2655 FAIL !!!!!!!! 
> [Low4/32]BCFN(2+10,13-9,T) R= +5881 p = 1e-1322 FAIL !!!!!!!! 
> [Low4/32]DC6-9x1Bytes-1 R=+1284826 p = 0 FAIL !!!!!!!! 
> [Low4/32]Gap-16:A R=+412185 p = 0 FAIL !!!!!!!! 
> [Low4/32]Gap-16:B R=+2520495 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(0,14-1) R=+631088 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(1,14-2) R=+12449 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(4,14-4) R=+705389 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(5,14-5) R=+14266 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(8,14-7) R=+743698 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(9,14-8) R=+14419 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(12,14-10) R=+535960 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:(13,14-11) R= +8504 p = 3e-3707 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:all R=+999316 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:all2 R=+451461539040 p = 0 FAIL !!!!!!!! 
> [Low4/32]FPF-14+6/16:cross R=+5271881 p = 0 FAIL !!!!!!!! 
> [Low4/32]BRank(12):128(4) R= +3718 p~= 5e-1978 FAIL !!!!!!!! 
> [Low4/32]BRank(12):256(2) R= +5148 p~= 1e-1550 FAIL !!!!!!!! 
> [Low4/32]BRank(12):384(1) R= +5018 p~= 1e-1511 FAIL !!!!!!!! 
> [Low4/32]BRank(12):512(2) R= +8862 p~= 8e-2669 FAIL !!!!!!!! 
> [Low4/32]BRank(12):768(1) R= +8376 p~= 1e-2522 FAIL !!!!!!!! 
> ...and 60 test result(s) without anomalies
> Traceback (most recent call last):
> File "Collatzgenerator01.py", line 50, in <module>
> print(binary) 
> BrokenPipeError: [Errno 32] Broken pipe
> Pytanie, czy program przetestował poprawnie, to co miał przetestować? Mam wątpliwości.

Jeśli Twój program wyświetla binarne dane, to zwyczajnie nie przechodzi testów, bo ma
za słabą losowość. Jeśli wyświetla dane tekstowe, czyli binarne znaki ASCII '0' i '1',
czyli binarnie 00110000 i 00110001, to nawet jak ma dobrą losowość, nie przejdzie
testu, ponieważ tylko jeden bit się zmienia losowo, reszta jest ciągle taka sama.
Może zapisz do pliku to co wyświetla Twój program i zobacz w edytorze hexadecymalnym
jakie tam są naprawdę dane - binarne czy tekstowe, czy nie ma znaków nowej linii, itd.

Pozdrawiam
Technical Details
Message-ID: <13a1f334-79f6-4353-8c79-5b6863396c95n@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
References: <6a2d60cf-5d52-4f70-a0bb-67ac51f2ea47n@googlegroups.com> <0b0e0278-0506-4691-8051-1f73a327e87an@googlegroups.com> <1aabf0e1-8c01-4479-90fc-62d1026d221cn@googlegroups.com> <fcda7316-c8b0-445b-a5d5-2c8db0e2c939n@googlegroups.com> <59524bbe-00b1-4756-b359-19bb000e8641n@googlegroups.com> <2aec1845-1ec1-4e83-835a-ccc9aa089c23n@googlegroups.com> <f201e244-08b1-4ec6-977a-40aba70eac76n@googlegroups.com> <48a87319-4f87-4ace-b9e1-e8c9842514can@googlegroups.com> <5af4b1e3-4d68-4ea8-a5cf-7d2b1075041cn@googlegroups.com> <680b4111-0c0b-4406-ae78-fc27fa1a545an@googlegroups.com> <efe0a67a-6b05-40d2-b877-e5a51f57dd9fn@googlegroups.com> <cb8e26f0-392e-4848-b573-e232e943b6f5n@googlegroups.com> <08cd0111-4022-41af-a03a-a3a4a6307ef6n@googlegroups.com> <c66ce87b-7302-4c87-813b-187c36feffd1n@googlegroups.com> <4a215489-d501-49d5-ade6-cf771ffee901n@googlegroups.com> <7ccd7613-9d6d-4d46-b68f-1db4e9d7a5e3n@googlegroups.com> <9082e2ac-cd7d-436d-80a8-7d12109d3297n@googlegroups.com> <227b1c0e-5d3c-4323-a374-de316aec2ffcn@googlegroups.com> <11f92832-5699-4cf9-be0d-412f9248f4den@googlegroups.com> <97a8c494-64a8-46c0-a17a-114d86aa94d9n@googlegroups.com> <d5976242-a26f-4b4a-93c0-49f7c056c46dn@googlegroups.com> <bf97ae93-0973-4e7d-a7dc-36e681b2479bn@googlegroups.com> <bdc239bf-9878-4a79-a5c4-e007aee2c279n@googlegroups.com>

Show Full Headers
Complete Article Headers
X-Received: by 2002:a37:e50e:: with SMTP id e14mr15019030qkg.71.1629592284442;        Sat, 21 Aug 2021 17:31:24 -0700 (PDT)
X-Received: by 2002:a0c:e883:: with SMTP id b3mr27015680qvo.23.1629592284272; Sat, 21 Aug 2021 17:31:24 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: pl.comp.programming
Date: Sat, 21 Aug 2021 17:31:24 -0700 (PDT)
In-Reply-To: <bdc239bf-9878-4a79-a5c4-e007aee2c279n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=37.128.16.171; posting-account=xjvq9QoAAAATMPC2X3btlHd_LkaJo_rj
NNTP-Posting-Host: 37.128.16.171
References: <6a2d60cf-5d52-4f70-a0bb-67ac51f2ea47n@googlegroups.com> <0b0e0278-0506-4691-8051-1f73a327e87an@googlegroups.com> <1aabf0e1-8c01-4479-90fc-62d1026d221cn@googlegroups.com> <fcda7316-c8b0-445b-a5d5-2c8db0e2c939n@googlegroups.com> <59524bbe-00b1-4756-b359-19bb000e8641n@googlegroups.com> <2aec1845-1ec1-4e83-835a-ccc9aa089c23n@googlegroups.com> <f201e244-08b1-4ec6-977a-40aba70eac76n@googlegroups.com> <48a87319-4f87-4ace-b9e1-e8c9842514can@googlegroups.com> <5af4b1e3-4d68-4ea8-a5cf-7d2b1075041cn@googlegroups.com> <680b4111-0c0b-4406-ae78-fc27fa1a545an@googlegroups.com> <efe0a67a-6b05-40d2-b877-e5a51f57dd9fn@googlegroups.com> <cb8e26f0-392e-4848-b573-e232e943b6f5n@googlegroups.com> <08cd0111-4022-41af-a03a-a3a4a6307ef6n@googlegroups.com> <c66ce87b-7302-4c87-813b-187c36feffd1n@googlegroups.com> <4a215489-d501-49d5-ade6-cf771ffee901n@googlegroups.com> <7ccd7613-9d6d-4d46-b68f-1db4e9d7a5e3n@googlegroups.com> <9082e2ac-cd7d-436d-80a8-7d12109d3297n@googlegroups.com> <227b1c0e-5d3c-4323-a374-de316aec2ffcn@googlegroups.com> <11f92832-5699-4cf9-be0d-412f9248f4den@googlegroups.com> <97a8c494-64a8-46c0-a17a-114d86aa94d9n@googlegroups.com> <d5976242-a26f-4b4a-93c0-49f7c056c46dn@googlegroups.com> <bf97ae93-0973-4e7d-a7dc-36e681b2479bn@googlegroups.com> <bdc239bf-9878-4a79-a5c4-e007aee2c279n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <13a1f334-79f6-4353-8c79-5b6863396c95n@googlegroups.com>
Subject: Re: Jak zrobić test za pomocą
 PractRand?
From: "M.M." <mmarszik@gmail.com>
Injection-Date: Sun, 22 Aug 2021 00:31:24 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit