Or, nowadays also: pseudorand =: 64006|15091*]
Esa -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Markus Schmidt-Gröttrup Sent: 16.09.2008 13:48 To: Programming forum Subject: Re: [Jprogramming] pseudo-random sequence You could use pseudorand =: 64006&|@:(15091&*) pseudorand^: (<10) ]1 1 15091 4933 4925 12209 36751 61357 27691 53713 10899 best wishes, Markus ----- Original Message --------------- Subject: [Jprogramming] pseudo-random sequence From: "Jean Claude Coez" <[EMAIL PROTECTED]> Date: Tue, 16 Sep 2008 10:50:53 +0200 To: "Programming forum" <[email protected]> >Choose an integer U0 such that (0 < U0 <= 64006 ) >then define a pseudo-random sequence as: >Un+1 = ( 15091 * Un ) mod 64007 >while n < 40000 for instance. > >What would be a nice J solution ? (apart my ugly solution which I don't dare >to show...) >Thanks > > >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
