[12732] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: decmips 7.7G: rand()

daemon@ATHENA.MIT.EDU (Ezra Peisach)
Thu Oct 13 08:42:21 1994

To: Petr Adamek <adamek@MIT.EDU>
Cc: bugs@MIT.EDU
In-Reply-To: Your message of "Wed, 12 Oct 1994 22:48:06 EDT."
             <9410130248.AA14848@e51-007-6.MIT.EDU> 
Date: Thu, 13 Oct 1994 08:42:18 EDT
From: Ezra Peisach <epeisach@MIT.EDU>


>Oops. I am sorry for not reading the manpages.  I thought, rather
>naively, that a function required in the standard library by ANSI C
>standard might be deemed a reliable one.  Not so.

For amusement sake, the OSF man page has the following:

  There	are better random number generators, as	noted above; however, the
  rand() and srand() functions are the interfaces defined for the ANSI C
  library.

Depending on what your programs is doing - how elaborate, will you be
distributing it, etc, you could use a configure script to determine what
is supported on the system you are using.... I imagine rand on a purely
ANSI system, without random or drand48 is probably ok....

I believe all platforms that are currently supported by I/S do have the
random function though.

	Ezra

home help back first fref pref prev next nref lref last post