Newsgroups: rec.arts.int-fiction
Subject: Re: [TADS] Random numbers
From: gdighton@geocities.com (Garth Dighton)
References: <5fc0cf9a.0205071229.7dc3cfcc@posting.google.com> <ab9f45$3l9$1@reader1.panix.com>
User-Agent: Xnews/03.04.11
X-no-productlinks: yes
Message-ID: <3cd84032$1_2@news2.newsgroups.com>
Date: 7 May 2002 15:59:30 -0500
Lines: 40
X-Authenticated-User: 86138934
X-Comments: This message was posted through Newsfeeds.com
X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support,  spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to <abuse@newsfeeds.com> You may also use our online abuse reporting from: http://www.newsfeeds.com/abuseform.htm
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Organization: Newsfeeds.com http://www.newsfeeds.com 90,000+ UNCENSORED Newsgroups.
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!nntp.abs.net!news.voicenet.com!news-out.spamkiller.net!propagator2-la!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!news2.newsgroups.com!not-for-mail
Xref: news.duke.edu rec.arts.int-fiction:104029

erkyrath@eblong.com (Andrew Plotkin) wrote in
<ab9f45$3l9$1@reader1.panix.com>:

>Ethyl Yuter <rangieriasiasti@hotmail.com> wrote:
>> It seems to be that the Tads random number generator is quite
>> unrandom, as in, it more than reguarly generates the same number.
>> I've included randomize(); within my init(), and I am not sure what
>> the best way to generate highly random numbers is, as in, a random
>> number between 1 and 10 should not come up with 3 5's in a row, 4 3's
>> in a row, etc, as I have encountered on multiple occasions in my
>> program.
>
>In a truly random sequence of numbers between 1 and 10, three-in-a-row
>(of anything) should occur about once every hundred values. On
>average, of course.
>
>It's not as uncommon as you might expect.
>
>That said, I believe the TADS interpreter relies on the underlying
>system library random-number generator, and some platforms don't have
>a very good library.
>
>--Z
>
>"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
>borogoves..." *
>* Make your vote count. Get your vote counted.
>

You can use _rand() for (supposedly) better random numbers, although it's
slower. I've never found it worth the bother of remembering to put in the
underscore, but it's available.

--
Garth Dighton


-----------== Posted via Newsgroups.Com - Uncensored Usenet News ==----------
   http://www.newsgroups.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Ulimited Fast Downloads - 19 Servers =-----
