delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/11/20:47:35

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: rand() or random()
Date: 8 Nov 1997 07:41:43 GMT
Organization: The National Capital FreeNet
Lines: 14
Message-ID: <64153n$ipi@freenet-news.carleton.ca>
References: <63mh1a$9r4$1 AT postern DOT mbnet DOT mb DOT ca> <#Lau#NX68GA DOT 291 AT upnetnews02 DOT moswest DOT msn DOT net> <63og7k$8jr$4 AT news DOT ox DOT ac DOT uk>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


If rand() is ANSI but GCC's algorithm for rand() sucks, while its
algorithm for random() is great, why not just use the better algorithm for
both rand() and random(), while making sure the rand() arguments and
return values have the same ranges and semantics as ANSI requires?

What exactly is the difference between the functions except the names?

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019