1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-19 02:33:19 +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
..
2020-02-03 20:45:09 +01:00
2020-04-02 22:58:16 +02:00
2019-11-20 12:54:47 +01:00
2020-07-12 23:11:43 +02:00
2020-04-02 22:58:16 +02:00
2020-07-12 23:11:43 +02:00
2018-12-30 18:57:46 +01:00
2020-04-02 10:42:06 +02:00
2020-04-06 18:13:54 +02:00
2020-02-03 20:45:09 +01:00
2020-02-03 20:45:09 +01:00
2019-11-07 21:45:19 +01:00
2020-02-03 20:45:09 +01:00
2020-02-03 20:45:09 +01:00
2020-05-28 08:50:20 -04:00
2020-07-14 22:54:03 -04:00