Path: utzoo!utgpu!watmath!clyde!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: Yet another pseudo-random number generator Message-ID: <419@lakart.UUCP> Date: 12 Feb 89 20:58:53 GMT References: <7383@batcomputer.tn.cornell.edu> Organization: Lakart Corporation, Newton, MA Lines: 22 braner@batcomputer.tn.cornell.edu (Moshe Braner) sez: > /* > * The algorithm here is basically x[i] = x[i-31] EOR x[i-7]. > * (Could possibly improve by using x[i] = x[i-127] EOR x[i-63]?) > * Each x[i] here is 32 bits wide, could also be 16 or whatever. > */ Sounds to me like you're running 16 or 32 LCG's in parallel. This means that: 1. Individual bits will have all the problems associated with a LCG. 2. Supposing all your seed values have bit 7 == 0. You'll never ever get a 1 bit in bit 7. A somwhat remote possibility, but it could occur. Comments anyone? -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+