Reading through the random number generator guide on wolfram, under the methods section for the congruential method, it talks about the “Bits” option. Could someone explain what this means to me? I don’t get it at all. What does it mean by the “range of bits in the modulus used for constructing numbers from bits”? Obviously I’m missing some context, I’d appreciate if someone could provide enlightenment.

“ The "Bits" option can be Automatic, a nonzero integer, or a list of two nonzero integers specifying the range of bits in the modulus  used for constructing numbers from bits. Automatic uses {2,-1} unless  is a power of 2, in which case {1,-1} is used.”

  • $\begingroup$ This option is used when the option "ConvertToRealsDirectly" is false, and determines which bits are used in the construction of the output sequence. $\endgroup$
    – ciao
    Oct 14, 2019 at 4:18
  • $\begingroup$ So, iirc if that option is false it takes 8 bits at a time to form a 52 bit form of a number. Does “Bit” determine the number of bits to use at a time from each number generated, or am I mistaken? $\endgroup$
    – Shinaolord
    Oct 14, 2019 at 4:19
  • $\begingroup$ Sorry, I don't recall the details I used to know - there's just no good reason to use an LCG other than demonstrating how bad they are, and I've long forgotten the innards of wolfram's implementation. $\endgroup$
    – ciao
    Oct 14, 2019 at 16:20
  • $\begingroup$ It’s alright. Thanks anyway. $\endgroup$
    – Shinaolord
    Oct 14, 2019 at 16:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.