>>>>> "wtw" == William T Wilson <[EMAIL PROTECTED]> writes:

  wtw> Well, what do you expect, working libraries on DOS?  :) The

The ANSI standard stipulates that rand() returns an int if I recall
correctly.  Hence the library implementors had no choice.

  wtw> random number generator under Linux is reasonably good, as good
  wtw> as any quick-and-dirty generator is.  It's a 32 bit generator

The best C RNG I'm yet aware of is definitely quick-and-dirty.  It's
due to George Marsaglia.  If you're interested, you could find it on
DejaNews.  He posted it in this article:-

> Subject:      A RANDOM NUMBER GENERATOR FOR C
> From:         George Marsaglia <[EMAIL PROTECTED]>
> Date:         1997/09/29
> Message-ID:   <[EMAIL PROTECTED]>
> Newsgroups:   sci.math


  wtw> and the low bits are just as random as the high bits.


  wtw> random() is better than rand(), but only because you can set
  wtw> more options on the function call.  rand() is probably there
  wtw> for compatibility.

...with the ISO and ANSI C standards!


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to