Newsgroups: comp.lang.pl1, sci.math, comp.lang.c, sci.crypt, comp.lang.fortran
From: "robin" <robi...@bigpond.com>
Date: Tue, 01 Dec 2009 06:55:22 GMT
Local: Tues, Dec 1 2009 1:55 am
Subject: Re: SuperKISS for 32- and 64-bit RNGs in PL/I.
This 32-bit version uses the unsigned arithmetic facilities of PL/I:
/*-------------------------------------------------------------*/ testKISS32: procedure options (main); /* George Marsaglia's Pseudo-Random Number Generator having a period of */ KISS32: procedure() returns(fixed binary (32) unsigned) options (reorder); if indx <= 41265 then do; x=Q(indx); indx=indx+1; end; refill: procedure() returns(fixed binary(32) unsigned) options (reorder); do i = 1 to 41265; fill: procedure options (reorder); do i=1 to 41265; /* fill Q with Congruential+Xorshift */ declare i fixed binary (31), x fixed binary (32) unsigned; call fill; /*--------------------------------------------------------------- */ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||