1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
Brad Smith 041f981960
rand() use XOR to break up unwanted pair correlation (#1107)
* rand() use XOR to break up unwanted pair correlation

This form of rand() cannot return the same value twice in a row.
Two additonal EOR instructions produce a more even distribution of successive pairs.
see comments on #951

* rand.s document purpose of XOR

* suggested srand() optimization: zero fill unnecessary

* test to validate implementation of rand()

* srand() improving behaviour and adding startup test

* srand() with a tail call to rand() for better initial shuffle

* srand() can fall through to rand() instead of tail call
2020-07-21 23:38:18 +02:00
..
2016-03-16 16:28:32 +01:00
2011-04-25 18:49:24 +00:00
2020-04-02 22:58:16 +02:00
2003-06-12 09:10:50 +00:00
2020-04-02 22:58:16 +02:00
2016-06-13 20:40:01 +02:00
2019-02-05 23:27:52 +01:00
2018-05-21 14:41:12 +02:00
2005-04-21 21:26:15 +00:00
2018-08-02 17:12:12 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2018-08-02 17:12:12 +02:00
2018-05-22 16:00:05 +02:00
2017-06-09 16:57:47 +03:00
2018-08-02 17:12:12 +02:00
2020-02-03 20:45:09 +01:00
2020-02-03 20:45:09 +01:00
2010-06-03 21:31:06 +00:00
2015-09-11 14:18:22 -04:00
2003-03-14 00:02:58 +00:00
2019-04-13 11:25:54 +02:00
2017-06-28 20:43:31 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2018-05-29 14:29:50 -04:00
2020-04-02 22:58:16 +02:00
2018-08-19 14:35:30 +02:00
2002-11-13 08:56:45 +00:00
2020-04-02 22:58:16 +02:00
2020-04-02 22:58:16 +02:00
2003-06-12 08:43:57 +00:00
2003-12-03 20:23:09 +00:00
2015-07-17 20:36:56 -04:00