Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: Michael Meissner Message-ID: <20000705181726.19198@cse.cygnus.com> Date: Wed, 5 Jul 2000 18:17:26 -0400 To: "J. J. Farrell" Cc: Cygwin Mailing List Subject: Re: Random no. problem References: <20000705154730 DOT 21248 AT cse DOT cygnus DOT com> <200007052211 DOT PAA17557 AT aleph DOT ssd DOT hal DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <200007052211.PAA17557@aleph.ssd.hal.com>; from J. J. Farrell on Wed, Jul 05, 2000 at 03:11:39PM -0700 On Wed, Jul 05, 2000 at 03:11:39PM -0700, J. J. Farrell wrote: > > From: Michael Meissner > > > > On Wed, Jul 05, 2000 at 02:32:24PM -0400, DJ Delorie wrote: > > > > > > > Is there a way i can get the same random numbers on Windows NT 4 and > > > > Sun/SGI ? > > > > > > You can write your own random number generator, and use it instead of > > > the system's generator. Otherwise, there is *no* standard for random > > > number generators. > > > > Actually the ISO C standard mandates the algorithm for the weaker 'rand' and > > 'srand' functions. > > Is that new in C99 (or whenever the second version was ratified)? > C89 includes an example implementation, but doesn't mandate any > particular algorithm anywhere that I can see. Ok, I'm obviously misremembering things. Obviously the thing to do is write your own random number generator, or adapt one of the ones in the libraries, changing names, assuming you can live with the copyright. -- Michael Meissner, Red Hat, Inc. PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA Work: meissner AT redhat DOT com phone: +1 978-486-9304 Non-work: meissner AT spectacle-pond DOT org fax: +1 978-692-4482 -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com