Re: Positive random number
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Wed, 19 Dec 2007 13:42:17 +0000
Spoon said:
pete wrote:
The return value of rand isn't guaranteed to be positive.
What does "positive" mean?
Greater than zero.
Is x positive if and only if x > 0?
Yes.
Does that mean that 0 is neither positive nor negative?
Yes.
For the record, the rand function computes a sequence of
pseudo-random integers in the range 0 to RAND_MAX.
Yes.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.
- Follow-Ups:
- Re: Positive random number
- From: Johannes Bauer
- Re: Positive random number
- References:
- Positive random number
- From: deepak
- Re: Positive random number
- From: Jack Klein
- Re: Positive random number
- From: Keith Thompson
- Re: Positive random number
- From: Johannes Bauer
- Re: Positive random number
- From: pete
- Re: Positive random number
- From: Spoon
- Positive random number
- Prev by Date: Re: function prototype vs function declaration
- Next by Date: Re: A question regarding Q20.1 from c-faq.com
- Previous by thread: Re: Positive random number
- Next by thread: Re: Positive random number
- Index(es):
Relevant Pages
|