Linear congruential generator: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: used variables to hold a couple of powers of 2, added/changed comments and whitespace, used whitespace in the two centered output titles.) |
m (→{{header|REXX}}: changed the REXX program comment.) |
||
Line 2,686: | Line 2,686: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
<lang rexx>/*REXX program uses a congruential generator that simulates the old |
<lang rexx>/*REXX program uses a linear congruential generator (LCG) that simulates the old BSD */ |
||
/* |
/*──────── and MS random number generators: BSD= 0──►(2^31)-1 MS= 0──►(2^16)-1 */ |
||
numeric digits 20 /*use enough dec. digs for the multiply*/ |
numeric digits 20 /*use enough dec. digs for the multiply*/ |
||
two@@16= 2**16 /*use a variable to contain 2^16 */ |
two@@16= 2**16 /*use a variable to contain 2^16 */ |