[uClibc]rand() doesn't generate numbers in the specified range
Erik Andersen
andersen at codepoet.org
Tue Mar 19 12:25:40 UTC 2002
On Sat Mar 16, 2002 at 04:58:08PM +0000, Alex Holden wrote:
> Hi, it appears that uClibc rand() (including the latest CVS release)
> doesn't generate numbers in the range 0 to RAND_MAX (defined in stdlib.h
> as 2147483647). If I was to guess, I would say that it appears to
> generate numbers in the range 0 to 32767. This breaks some code I have
> that uses the value of RAND_MAX to scale the output of rand() to a
> double within a specified range.
better now?
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list