Article View: net.bugs
Article #83Re: non-randomness in rand() - (nf)
From: utzoodecvaxharponpoiveisxwhuxlbe...
Date: Tue, 22 Mar 1983 17:43
Date: Tue, 22 Mar 1983 17:43
37 lines
931 bytes
931 bytes
#R:p500vax:-17800:whuxlb:1800003:000:484
whuxlb!eric Mar 22 17:22:00 1983
***** whuxlb:net.bugs / p500vax!pat / 8:39 pm Mar 18, 1983
rand(), the random number generator in the UNIX library, returns
alternating even and odd numbers.
----------
well, i'm running UNIX 5.0, and here is my program:
main() {
while (1) printf("%ld\n",rand());
}
and sample output:
16838
5758
10113
17515
31051
5627
23010
7419
16212
4086
2749
12767
9084
looks pretty distributed to me!?! maybe you're running
a different UNIX???
Eric Holtman
harpo!whuxlb!eric
Technical Details
Message-ID:
<bnews.whuxlb.1038>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
From: utzoo!decvax!harpo!npoiv!eisx!whuxlb!eric Newsgroups: net.bugs Title: Re: non-randomness in rand() - (nf) Article-I.D.: whuxlb.1038 Posted: Tue Mar 22 17:43:54 1983 Received: Wed Mar 23 20:34:49 1983 Subject: Re: non-randomness in rand() - (nf) Date: Tue, 22 Mar 1983 17:43:54 +0000 Message-ID: <bnews.whuxlb.1038>