Randomization measure in rand

8 ビュー (過去 30 日間)
Sandeep Ganji
Sandeep Ganji 2013 年 10 月 18 日
コメント済み: Sandeep Ganji 2013 年 10 月 18 日
What is the randomization power in rand function.? For example UNIX drand48 can generate a randomization of 2^48 (~10^14).

採用された回答

Walter Roberson
Walter Roberson 2013 年 10 月 18 日
2^53 different possibilities.
You should also be caring about how long the period is (that is, the time until the sequence repeats.) It is on the order of 2^11000 for the default randomization routine.
  4 件のコメント
Walter Roberson
Walter Roberson 2013 年 10 月 18 日
編集済み: Walter Roberson 2013 年 10 月 18 日
If your thought is to periodically have your program use rng('shuffle') in order to "improve the randomness", then interestingly it can be shown that this will reduce the randomness, because the times used as input to the shuffling will end up being correlated.
If you need "cryptographic strength" randomness, then you need to use special routines for that purpose that are "hardened" to reduce leakage of information about the internal state of the generator.
Sandeep Ganji
Sandeep Ganji 2013 年 10 月 18 日
Thank you. I will consider shifting to a more robust random number generator.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by