Re: [fpc-pascal] 32-bit random numbers

2017-04-21 Thread Mark Morgan Lloyd
On 21/04/17 17:00, Peter wrote: On 21/04/17 10:11, Mark Morgan Lloyd wrote:> Am I correct in interpreting the documentation as implying that if I> want to get a full-range 32-bit unsigned random number I have to use> something like Random($1) ?> > Internally, that gets a 64-bit random b

Re: [fpc-pascal] 32-bit random numbers

2017-04-21 Thread Peter
On 21/04/17 10:11, Mark Morgan Lloyd wrote: > Am I correct in interpreting the documentation as implying that if I > want to get a full-range 32-bit unsigned random number I have to use > something like Random($1) ? > > Internally, that gets a 64-bit random by calling genrand_MT19937 twice

[fpc-pascal] 32-bit random numbers

2017-04-21 Thread Mark Morgan Lloyd
Am I correct in interpreting the documentation as implying that if I want to get a full-range 32-bit unsigned random number I have to use something like Random($1) ? Internally, that gets a 64-bit random by calling genrand_MT19937 twice and throwing away one of the results. Not only do