Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 12 Mar 2002 09:32:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 12 Mar 2002 09:32:13 -0500 Received: from chaos.analogic.com ([204.178.40.224]:11137 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id ; Tue, 12 Mar 2002 09:32:01 -0500 Date: Tue, 12 Mar 2002 09:30:34 -0500 (EST) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: wli@holomorphy.com cc: Andrea Arcangeli , wli@parcelfarce.linux.theplanet.co.uk, linux-kernel@vger.kernel.org, riel@surriel.com, hch@infradead.org, phillips@bonn-fries.net Subject: Re: 2.4.19pre2aa1 In-Reply-To: <20020312141738.D14628@holomorphy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Mar 2002 wli@holomorphy.com wrote: > On Tue, Mar 12, 2002 at 08:33:23AM -0500, Richard B. Johnson wrote: > > This is a simple random number generator. It takes a pointer to your > > own private long, somewhere in your code, and returns a long random > > number with a period of 0xfffd4011. I ran a program for about a > > year, trying to find a magic number that will produce a longer > > period. > > > > You could add a ldiv and return the modulus to set hash-table limits. > > ANDs are not good because, in principle, you could get many numbers > > in which all the low bits are zero. > > > > > > The advantage of this simple code is it works quickly. The disadvantages > > are, of course, its not portable and a rotation of a binary number > > is not a mathematical function, lending itself to rigorous analysis. > > Would you mind explaining what the point of this is? AFAICT this is > meaningless noise inspired by the words "/dev/random". > > > Bill > Really? Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips). Windows-2000/Professional isn't. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/