Use of Diehard & Dieharder: How to format a suitable input for Diehard and Dieharder?
6 ビュー (過去 30 日間)
古いコメントを表示
NGUYEN Duy Ngan
2014 年 4 月 18 日
コメント済み: NGUYEN Duy Ngan
2014 年 4 月 22 日
Dear all,
I am studying on testing PRNG and I have problem in using Diehard and Dieharder. This intruction in Diehard's document (Marsaglia) is not clear to me: _
Your random number generator should produce 32-bit integers.
(If 31 bits, left justify by shift-left-one, as some of the
tests in DIEHARD favor leading bits.) You should send them to
your ascii file in hex form, 8 hex 'digits' per integer,
10 integers per line, no intervening spaces. The ascii file
will be twice as big as the binary file it is reduced to._
In fact, I generated random number by using Matlab to implement some algorithm and also obtained the integer numbers. But I am not sure how to make a test file which is used as an input for Diehard or Dieharder. I hope to hear from you in detail about my problem.
Thank you,
0 件のコメント
採用された回答
Walter Roberson
2014 年 4 月 18 日
fprintf(fid, [repmat('%08x', 1, 10), '\n'], YourVector)
3 件のコメント
Walter Roberson
2014 年 4 月 22 日
If you want to run all 15 Diehard tests at once, make sure your data files contain about 2.5 million numbers. They will be about 10 megabytes in size.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!