[Oberon] SystemV - Random Number

Jörg joerg.straube at iaeth.ch
Sat Mar 23 01:02:43 CET 2019


Basically, I coded a Lehmer (Park Miller) pseudo random number generator (PRNG)
https://en.m.wikipedia.org/wiki/Lehmer_random_number_generator#Parameters_in_common_use

Lehmer PRNGs are special cases of LCGs:
https://en.m.wikipedia.org/wiki/Linear_congruential_generator

I took n = 2^31-1 and g = 48271

br
Jörg

> Am 23.03.2019 um 00:47 schrieb Jörg <joerg.straube at iaeth.ch>:
> 
> You could take my RandomNumbers.Mod or program your own 😀
> Jörg
> 
>> Am 22.03.2019 um 19:52 schrieb Tomas Kral <thomas.kral at email.cz>:
>> 
>> Hi,
>> 
>> How can we do a random number, with a seed?
>> 
>> -- 
>> Tomas Kral <thomas.kral at email.cz>
>> --
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>> https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20190323/58ce2e24/attachment.html>


More information about the Oberon mailing list