🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #308735

Re: test randomizacyjny w C

#308735
From: M.M.
Date: Tue, 27 Sep 2016 19:56
159 lines
11958 bytes
On Tuesday, September 27, 2016 at 9:39:48 PM UTC+2, Borneq wrote:
> W dniu 27.09.2016 o 21:02, M.M. pisze:
> > On Tuesday, September 27, 2016 at 8:21:41 PM UTC+2, Borneq wrote:
> >> W dniu 27.09.2016 o 20:10, M.M. pisze:
> >>> Nie wiem czemu nie przechodzi, miał być taki dobry... Może źle testujesz?
> >>
> >> Ciekawa sprawa, ledwo przechodzi ale jest WEAK, i to dla różnych seedów.
> >> Może jest nie najlepszy, bo nie jest ważne że losowo pomija od 1 do 32,
> >> ale trzeba pomijać ze 199 po porcji 24.
> >
> > Nie wiem, odpaliłem mój prościutki generator jeszcze raz i przechodzi. Tylko jeden był week. To jak tamtem jest taki dobry, to tym bardziej powinien
> > przechodzić
> >
> > time ./rnd | dieharder -a -g 200 -m 1
> 
> A jak ten Twój rnd wypluwa wyniki? w formie tekstowej czy jakoś binarnie 
> , jak do stdout?


Opcja -g 200 czyli wypluwa na stdout w formacie binarnym.

Cytat:
[
Note that the stdin_input_raw interface (-g 200) is a "universal" interface. Any generator that can produce a (continuous) stream of presumably random bits can be tested with dieharder.
]


Następny test, wygląda że wszystko jest w porządku. Ani jeden nie jest week.

time ./rnd | dieharder -a -g 200 -m 1
#=============================================================================#
#            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
#=============================================================================#
   rng_name    |rands/second|   Seed   |
stdin_input_raw|  2.54e+07  |1059283188|
#=============================================================================#
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
#=============================================================================#
   diehard_birthdays|   0|       100|     100|0.68409170|  PASSED  
      diehard_operm5|   0|   1000000|     100|0.74897730|  PASSED  
  diehard_rank_32x32|   0|     40000|     100|0.30566304|  PASSED  
    diehard_rank_6x8|   0|    100000|     100|0.25275266|  PASSED  
   diehard_bitstream|   0|   2097152|     100|0.73612808|  PASSED  
        diehard_opso|   0|   2097152|     100|0.10305413|  PASSED  
        diehard_oqso|   0|   2097152|     100|0.88684586|  PASSED  
         diehard_dna|   0|   2097152|     100|0.58959488|  PASSED  
diehard_count_1s_str|   0|    256000|     100|0.31966526|  PASSED  
diehard_count_1s_byt|   0|    256000|     100|0.68179121|  PASSED  
 diehard_parking_lot|   0|     12000|     100|0.51759383|  PASSED  
    diehard_2dsphere|   2|      8000|     100|0.75271949|  PASSED  
    diehard_3dsphere|   3|      4000|     100|0.20880039|  PASSED  
     diehard_squeeze|   0|    100000|     100|0.98097632|  PASSED  
        diehard_sums|   0|       100|     100|0.13293677|  PASSED  
        diehard_runs|   0|    100000|     100|0.25724047|  PASSED  
        diehard_runs|   0|    100000|     100|0.30685125|  PASSED  
       diehard_craps|   0|    200000|     100|0.62576550|  PASSED  
       diehard_craps|   0|    200000|     100|0.80805638|  PASSED  
 marsaglia_tsang_gcd|   0|  10000000|     100|0.32504382|  PASSED  
 marsaglia_tsang_gcd|   0|  10000000|     100|0.26258745|  PASSED  
         sts_monobit|   1|    100000|     100|0.97351369|  PASSED  
            sts_runs|   2|    100000|     100|0.60911333|  PASSED  
          sts_serial|   1|    100000|     100|0.86675646|  PASSED  
          sts_serial|   2|    100000|     100|0.73850085|  PASSED  
          sts_serial|   3|    100000|     100|0.07689848|  PASSED  
          sts_serial|   3|    100000|     100|0.05018614|  PASSED  
          sts_serial|   4|    100000|     100|0.19863081|  PASSED  
          sts_serial|   4|    100000|     100|0.04009527|  PASSED  
          sts_serial|   5|    100000|     100|0.75704443|  PASSED  
          sts_serial|   5|    100000|     100|0.92169781|  PASSED  
          sts_serial|   6|    100000|     100|0.34974105|  PASSED  
          sts_serial|   6|    100000|     100|0.64712994|  PASSED  
          sts_serial|   7|    100000|     100|0.59210054|  PASSED  
          sts_serial|   7|    100000|     100|0.70483902|  PASSED  
          sts_serial|   8|    100000|     100|0.06183554|  PASSED  
          sts_serial|   8|    100000|     100|0.62716420|  PASSED  
          sts_serial|   9|    100000|     100|0.69732535|  PASSED  
          sts_serial|   9|    100000|     100|0.29952130|  PASSED  
          sts_serial|  10|    100000|     100|0.75344022|  PASSED  
          sts_serial|  10|    100000|     100|0.23429746|  PASSED  
          sts_serial|  11|    100000|     100|0.56465695|  PASSED  
          sts_serial|  11|    100000|     100|0.13630727|  PASSED  
          sts_serial|  12|    100000|     100|0.29195195|  PASSED  
          sts_serial|  12|    100000|     100|0.65403717|  PASSED  
          sts_serial|  13|    100000|     100|0.73256655|  PASSED  
          sts_serial|  13|    100000|     100|0.76963126|  PASSED  
          sts_serial|  14|    100000|     100|0.90144598|  PASSED  
          sts_serial|  14|    100000|     100|0.91522549|  PASSED  
          sts_serial|  15|    100000|     100|0.66193865|  PASSED  
          sts_serial|  15|    100000|     100|0.14827064|  PASSED  
          sts_serial|  16|    100000|     100|0.52145044|  PASSED  
          sts_serial|  16|    100000|     100|0.92534425|  PASSED  
         rgb_bitdist|   1|    100000|     100|0.54667349|  PASSED  
         rgb_bitdist|   2|    100000|     100|0.32418845|  PASSED  
         rgb_bitdist|   3|    100000|     100|0.13465529|  PASSED  
         rgb_bitdist|   4|    100000|     100|0.34803338|  PASSED  
         rgb_bitdist|   5|    100000|     100|0.58352832|  PASSED  
         rgb_bitdist|   6|    100000|     100|0.06843073|  PASSED  
         rgb_bitdist|   7|    100000|     100|0.46406951|  PASSED  
         rgb_bitdist|   8|    100000|     100|0.04828080|  PASSED  
         rgb_bitdist|   9|    100000|     100|0.60406650|  PASSED  
         rgb_bitdist|  10|    100000|     100|0.03212760|  PASSED  
         rgb_bitdist|  11|    100000|     100|0.80615081|  PASSED  
         rgb_bitdist|  12|    100000|     100|0.47883686|  PASSED  
rgb_minimum_distance|   2|     10000|    1000|0.24400536|  PASSED  
rgb_minimum_distance|   3|     10000|    1000|0.50015230|  PASSED  
rgb_minimum_distance|   4|     10000|    1000|0.43401145|  PASSED  
rgb_minimum_distance|   5|     10000|    1000|0.71514137|  PASSED  
    rgb_permutations|   2|    100000|     100|0.97508891|  PASSED  
    rgb_permutations|   3|    100000|     100|0.93745700|  PASSED  
    rgb_permutations|   4|    100000|     100|0.12881656|  PASSED  
    rgb_permutations|   5|    100000|     100|0.97265505|  PASSED  
      rgb_lagged_sum|   0|   1000000|     100|0.69904494|  PASSED  
      rgb_lagged_sum|   1|   1000000|     100|0.08711887|  PASSED  
      rgb_lagged_sum|   2|   1000000|     100|0.27533354|  PASSED  
      rgb_lagged_sum|   3|   1000000|     100|0.79760277|  PASSED  
      rgb_lagged_sum|   4|   1000000|     100|0.06906735|  PASSED  
      rgb_lagged_sum|   5|   1000000|     100|0.08810031|  PASSED  
      rgb_lagged_sum|   6|   1000000|     100|0.57729137|  PASSED  
      rgb_lagged_sum|   7|   1000000|     100|0.67246246|  PASSED  
      rgb_lagged_sum|   8|   1000000|     100|0.47748819|  PASSED  
      rgb_lagged_sum|   9|   1000000|     100|0.74649481|  PASSED  
      rgb_lagged_sum|  10|   1000000|     100|0.28732562|  PASSED  
      rgb_lagged_sum|  11|   1000000|     100|0.07640161|  PASSED  
      rgb_lagged_sum|  12|   1000000|     100|0.87546851|  PASSED  
      rgb_lagged_sum|  13|   1000000|     100|0.37664943|  PASSED  
      rgb_lagged_sum|  14|   1000000|     100|0.12235549|  PASSED  
      rgb_lagged_sum|  15|   1000000|     100|0.87386393|  PASSED  
      rgb_lagged_sum|  16|   1000000|     100|0.35517527|  PASSED  
      rgb_lagged_sum|  17|   1000000|     100|0.51943378|  PASSED  
      rgb_lagged_sum|  18|   1000000|     100|0.70200580|  PASSED  
      rgb_lagged_sum|  19|   1000000|     100|0.15007958|  PASSED  
      rgb_lagged_sum|  20|   1000000|     100|0.19720763|  PASSED  
      rgb_lagged_sum|  21|   1000000|     100|0.34022689|  PASSED  
      rgb_lagged_sum|  22|   1000000|     100|0.43294094|  PASSED  
      rgb_lagged_sum|  23|   1000000|     100|0.32866447|  PASSED  
      rgb_lagged_sum|  24|   1000000|     100|0.99026716|  PASSED  
      rgb_lagged_sum|  25|   1000000|     100|0.65374250|  PASSED  
      rgb_lagged_sum|  26|   1000000|     100|0.40907720|  PASSED  
      rgb_lagged_sum|  27|   1000000|     100|0.23069621|  PASSED  
      rgb_lagged_sum|  28|   1000000|     100|0.91865044|  PASSED  
      rgb_lagged_sum|  29|   1000000|     100|0.72871819|  PASSED  
      rgb_lagged_sum|  30|   1000000|     100|0.39325681|  PASSED  
      rgb_lagged_sum|  31|   1000000|     100|0.93991146|  PASSED  
      rgb_lagged_sum|  32|   1000000|     100|0.44698501|  PASSED  
     rgb_kstest_test|   0|     10000|    1000|0.33798269|  PASSED  
     dab_bytedistrib|   0|  51200000|       1|0.92405410|  PASSED  
             dab_dct| 256|     50000|       1|0.06909636|  PASSED  
Preparing to run test 207.  ntuple = 0
        dab_filltree|  32|  15000000|       1|0.21814234|  PASSED  
        dab_filltree|  32|  15000000|       1|0.92935563|  PASSED  
Preparing to run test 208.  ntuple = 0
       dab_filltree2|   0|   5000000|       1|0.05906371|  PASSED  
       dab_filltree2|   1|   5000000|       1|0.34953102|  PASSED  
Preparing to run test 209.  ntuple = 0
        dab_monobit2|  12|  65000000|       1|0.96099390|  PASSED  

real    50m55.068s
user    67m22.667s
sys     4m23.355s
Technical Details
Message-ID: <c1782be6-6830-4161-9b75-9c94b5c59019@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!z36no85030qtc.0!news-out.google.com!w143ni530itb.0!nntp.google.com!o21no648452itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <5777f44e$0$12548$65785112@news.neostrada.pl> <52620181-d1a6-4812-96a5-38eaed8f0860@googlegroups.com> <nlecfp$94i$1@portraits.wsisiz.edu.pl> <771ccedb-ab65-484c-95f6-fed3beab850d@googlegroups.com> <nlgdvu$7vo$1@node2.news.atman.pl> <nsbfoj$gk0$1@node1.news.atman.pl> <1121cd99-4f0c-42c9-af4e-bbb95846b221@googlegroups.com> <nsbi91$118$1@node2.news.atman.pl> <nsbja8$k91$1@node1.news.atman.pl> <nsbr2o$a64$1@node2.news.atman.pl> <nsbtc8$ch5$1@node2.news.atman.pl> <nsc0nj$fs7$1@node2.news.atman.pl> <nsc240$4fb$1@node1.news.atman.pl> <e4777e03-0727-4ca9-9beb-0d74176bc08b@googlegroups.com> <nsc44o$j5i$1@node2.news.atman.pl> <nsc4ik$jlr$1@node2.news.atman.pl> <nsdtnq$9cb$1@node2.news.atman.pl> <33d8cc17-5fae-445b-b34d-d9f0c0b00f32@googlegroups.com> <nsebkj$dt6$1@node1.news.atman.pl> <b92f5c87-2cf7-46a5-8046-ca65e9dcca9d@googlegroups.com> <nsedbk$fot$1@node1.news.atman.pl> <990f8ec5-a932-4b78-9e24-47a87018acb1@googlegroups.com> <nsehu3$so7$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
X-Received: by 10.129.167.65 with SMTP id e62mr7160880ywh.3.1475006195773;        Tue, 27 Sep 2016 12:56:35 -0700 (PDT)
X-Received: by 10.36.124.22 with SMTP id a22mr325710itd.4.1475006195727; Tue, 27 Sep 2016 12:56:35 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!z36no85030qtc.0!news-out.google.com!w143ni530itb.0!nntp.google.com!o21no648452itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.c
Date: Tue, 27 Sep 2016 12:56:35 -0700 (PDT)
In-Reply-To: <nsehu3$so7$1@node2.news.atman.pl>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.254.35.87; posting-account=xjvq9QoAAAATMPC2X3btlHd_LkaJo_rj
NNTP-Posting-Host: 77.254.35.87
References: <5777f44e$0$12548$65785112@news.neostrada.pl> <52620181-d1a6-4812-96a5-38eaed8f0860@googlegroups.com> <nlecfp$94i$1@portraits.wsisiz.edu.pl> <771ccedb-ab65-484c-95f6-fed3beab850d@googlegroups.com> <nlgdvu$7vo$1@node2.news.atman.pl> <nsbfoj$gk0$1@node1.news.atman.pl> <1121cd99-4f0c-42c9-af4e-bbb95846b221@googlegroups.com> <nsbi91$118$1@node2.news.atman.pl> <nsbja8$k91$1@node1.news.atman.pl> <nsbr2o$a64$1@node2.news.atman.pl> <nsbtc8$ch5$1@node2.news.atman.pl> <nsc0nj$fs7$1@node2.news.atman.pl> <nsc240$4fb$1@node1.news.atman.pl> <e4777e03-0727-4ca9-9beb-0d74176bc08b@googlegroups.com> <nsc44o$j5i$1@node2.news.atman.pl> <nsc4ik$jlr$1@node2.news.atman.pl> <nsdtnq$9cb$1@node2.news.atman.pl> <33d8cc17-5fae-445b-b34d-d9f0c0b00f32@googlegroups.com> <nsebkj$dt6$1@node1.news.atman.pl> <b92f5c87-2cf7-46a5-8046-ca65e9dcca9d@googlegroups.com> <nsedbk$fot$1@node1.news.atman.pl> <990f8ec5-a932-4b78-9e24-47a87018acb1@googlegroups.com> <nsehu3$so7$1@node2.news.atman.pl>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c1782be6-6830-4161-9b75-9c94b5c59019@googlegroups.com>
Subject: Re: test randomizacyjny w C
From: "M.M." <mmarszik@gmail.com>
Injection-Date: Tue, 27 Sep 2016 19:56:35 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit