9!:45 will set the seed. J on startup has the same seed. For the default generator, 9!:45 will take a long array as the seed (basically a polynomial representation of a 19000 bit number)
If you use the first random number generator (gbflip), the seed is a 31bit number. I've posted ways to get portable 32/64 bit compatible streams from that generator, but the others are not consistent between 32 and 64 bit platforms. You can probably use time as a seed with default generator if you cut off the miliseconds. ----- Original Message ----- From: Linda Alvord <[email protected]> To: [email protected] Cc: Sent: Friday, November 28, 2014 8:01 PM Subject: [Jprogramming] Get unique results each time you use deal and roll 7?7 1 4 5 0 6 2 3 10?10 5 1 3 2 4 0 7 8 6 9 Now run the code again after closing J and you get the same results. How can you get different results each time. I vaguely rember using some date or other number with roll to insure different results. Linda ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
