🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #217510

Re: Jak zrobić test za pomocą PractRand?

#217510
From: M.M.
Date: Sun, 22 Aug 2021 00:44
26 lines
3983 bytes
On Sunday, August 22, 2021 at 2:37:03 AM UTC+2, osobli...@gmail.com wrote:
> > 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.
> Generuję liczbę w Pythonie: 
> 
> liczba = 83866140218348733068398498750863724151 
> 
> I konwertuję ją na liczbę binarną za pomocą: 
> 
> binary = bin(liczba)[2:] 
> 
> Otrzymuję: 
> 
> 111111000110000000011111110100101000111111111111010000101011110100001111100111010001001100101011111011010110110100111001110111 
> 
> Ucinam pierwsze dwa znaki, bo inaczej miałbym dopisek: 
> 
> 0b111111000110000000011111110100101000111111111111010000101011110100001111100111010001001100101011111011010110110100111001110111 
> 
> Może jednak wyświetla znaki tekstowe? Może każda "1" i każde "0" jest czytanie jako ASCII.

Po tym co wyświetlił hexeditor na pewno to są znaki ascii.
Technical Details
Message-ID: <367247ba-b7b1-4b92-8bb1-252997a0cda4n@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news-1.dfn.de!news.dfn.de!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> <13a1f334-79f6-4353-8c79-5b6863396c95n@googlegroups.com> <2e3261ed-51bc-4b89-8f68-c76edf8176fdn@googlegroups.com>

Show Full Headers
Complete Article Headers
X-Received: by 2002:aed:2149:: with SMTP id 67mr23514169qtc.60.1629593076857;        Sat, 21 Aug 2021 17:44:36 -0700 (PDT)
X-Received: by 2002:a37:8044:: with SMTP id b65mr15264276qkd.150.1629593076714; Sat, 21 Aug 2021 17:44:36 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!news-1.dfn.de!news.dfn.de!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:44:36 -0700 (PDT)
In-Reply-To: <2e3261ed-51bc-4b89-8f68-c76edf8176fdn@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> <13a1f334-79f6-4353-8c79-5b6863396c95n@googlegroups.com> <2e3261ed-51bc-4b89-8f68-c76edf8176fdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <367247ba-b7b1-4b92-8bb1-252997a0cda4n@googlegroups.com>
Subject: Re: Jak zrobić test za pomocą
 PractRand?
From: "M.M." <mmarszik@gmail.com>
Injection-Date: Sun, 22 Aug 2021 00:44:36 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit