Re: [LINK] Faster RNG

From: George (greerga@CIRCLEMUD.ORG)
Date: 07/10/98


On Fri, 10 Jul 1998, George wrote:

>    return ( (double)y / (unsigned long)0xffffffff ); /* reals */
>    /* return y; */ /* for integer generation */

>1) No floating point math.
>    i.e.; "return ( (double)y / (unsigned long)0xffffffff ); /* reals */"

Oops, ne'ermind on that point. :)

The simplicity still applies though.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/          | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST