Re: [cc65] Possible bug in cc65

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-03-27 20:45:00
Hello,

* On Mon, Mar 26, 2012 at 10:50:42AM -0700 Joseph Rose wrote:
>                   Von Bassewitz: I once created a random number generator
                    ^^^^^^^^^^^^^
For German speakers (as Uz surely is), it sounds rude to call someone by
his last name (if you do not prepend "Mister" before it). Why don't you
call him Uz like everyone else here seemingly calls him?

>    for a game that died.  I first retrieved a word from the caller.  Then,
>    I added then XORed the same constant to the word, such that the number
>    is unmodified or, if desired, tweaked.  Then, I XORed the seed word to
>    the number.  Then, I ADDed another constant and XORed another.  Then, I
>    wrote the seed and repeated the previous state.  Depending on the
>    constants used, it should make $10000 hits before repeating.

Whenever someone comes up with a random number generator he invented, I
recommend to him reading Chapter 3 (Volume 2) of TAOCP
(https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming),
especially Don Knuth's comments on writing own RNGs (and his remark of
his own "super-RNG" he once invented).

It is really worth reading.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                      http://vice-emu.sf.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Mar 27 20:45:38 2012

This archive was generated by hypermail 2.1.8 : 2012-03-27 20:45:41 CEST