diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-28 21:40:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-28 21:40:21 -0700 |
commit | 07767785007f3d8d951736fb676778a6744e56b4 (patch) | |
tree | 1a0787db9badbe75bc1acf1e0b205234929d265f /tests | |
parent | 49476d06993fd9df7d1e7ebe94ca508226ffa1f5 (diff) | |
download | txr-07767785007f3d8d951736fb676778a6744e56b4.tar.gz txr-07767785007f3d8d951736fb676778a6744e56b4.tar.bz2 txr-07767785007f3d8d951736fb676778a6744e56b4.zip |
Use random padding in PRNG rather than 0xAA.
The purpose is to eliminate any biases in
the PRNG arising out of the regularity of that pattern, so
that the behavior of successive values is good from the
beginning.
This doesn't solve the problem that a short warm-up period
leads to a poor distribution of initial values relative to the
seed space. In other words, that similar seeds lead to
initially similar sequences.
* rand.c (rand_tab): New static array.
(make_random_state): Set uninitialized parts of state from the
corresponding elements in rand_tab, rather than to the
0xAAAAAAAA values.
(rand_compat_fixup): In 139 compatibility mode, clobber
rand_tab with 0xAA bytes.
* tests/013/maze.expected: Updated.
* txr.1: Added some PRNG implementation notes, and
also compatibility notes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/013/maze.expected | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/tests/013/maze.expected b/tests/013/maze.expected index e3cbbf80..b9c26ae0 100644 --- a/tests/013/maze.expected +++ b/tests/013/maze.expected @@ -1,61 +1,61 @@ + +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ -| | | | | | | | | -| | | | | | | | | -+ + + + +----+ + + + +----+ + +----+----+ + + +----+ +----+ -| | | | | | | | | | | | -| | | | | | | | | | | | -+----+----+----+----+ + +----+----+----+----+----+ +----+ + +----+ +----+----+ + -| | | | | | | | | -| | | | | | | | | -+ +----+ + + + +----+ +----+----+ +----+ + +----+ +----+ +----+ + -| | | | | | | | | | | | | -| | | | | | | | | | | | | -+ +----+----+----+----+ + +----+----+ +----+ + + + +----+----+----+ +----+ -| | | | | | | | | | | -| | | | | | | | | | | -+----+----+ + + +----+ + +----+----+ + + +----+----+----+ + + + + -| | | | | | | | | | | | | -| | | | | | | | | | | | | -+ +----+ + +----+----+----+ + + + +----+ +----+ + +----+ + + + -| | | | | | | | | | | | | -| | | | | | | | | | | | | -+ + +----+ + +----+ +----+----+ +----+ + + +----+----+ +----+----+----+ -| | | | | | | | | | | | -| | | | | | | | | | | | -+ +----+ +----+----+ +----+ + + + +----+ + +----+----+----+ + + + -| | | | | | | | | | | | -| | | | | | | | | | | | -+ + +----+ + +----+ + +----+----+----+ +----+----+ +----+ + + + + -| | | | | | | | | | | | | | -| | | | | | | | | | | | | | -+----+ + + +----+ +----+----+ +----+ + + + +----+----+ +----+----+ + -| | | | | | | | | | | -| | | | | | | | | | | -+ +----+----+----+ +----+----+ +----+ + + + +----+----+ + + +----+----+ -| | | | | | | | -| | | | | | | | -+ +----+ +----+----+----+----+----+ +----+----+ + +----+----+----+----+----+----+ + -| | | | | | | | | | -| | | | | | | | | | -+ + +----+ + +----+ + +----+----+----+----+ + +----+ +----+ + +----+ -| | | | | | | | | | | -| | | | | | | | | | | -+ +----+ +----+----+ +----+ +----+----+ + +----+----+ +----+ +----+----+ + -| | | | | | | | | | | -| | | | | | | | | | | -+----+----+ + + + + +----+ +----+----+----+ + + +----+----+----+ +----+ -| | | | | | | | | | -| | | | | | | | | | -+ +----+----+ +----+----+----+----+----+----+ + +----+----+----+ +----+ + +----+ -| | | | | | | | | -| | | | | | | | | -+----+ + + +----+ + +----+----+----+ +----+ + + +----+----+ +----+ + -| | | | | | | | | | | -| | | | | | | | | | | -+ +----+ +----+----+----+----+----+----+ + +----+----+----+ + +----+----+----+ + -| | | | | | | | | | | -| | | | | | | | | | | -+ +----+----+----+ + +----+ +----+ +----+----+ + + + + + + + + -| | | | | | | -| | | | | | | +| | | | | | | | | +| | | | | | | | | ++----+ + +----+ + + + + + +----+----+ + +----+----+ +----+ + + +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | ++ +----+ +----+----+----+ +----+----+ + + + + + + + + +----+ + +| | | | | | | | | +| | | | | | | | | ++----+----+----+----+----+ +----+ +----+----+----+ +----+ + +----+----+----+ +----+ +| | | | | | | | | | +| | | | | | | | | | ++ + +----+----+----+----+ +----+----+ + +----+ + + +----+----+ +----+ + +| | | | | | | | | | | | | +| | | | | | | | | | | | | ++ + + + +----+ + + + + + + +----+----+ +----+ + +----+----+ +| | | | | | | | | | | | | +| | | | | | | | | | | | | ++----+----+ +----+ + + +----+----+----+ +----+----+ +----+ +----+----+ + + +| | | | | | | | | | +| | | | | | | | | | ++ +----+----+ +----+ +----+ +----+ +----+ +----+----+ + + +----+----+ + +| | | | | | | | | | | | | +| | | | | | | | | | | | | ++----+ + +----+ + + +----+ +----+ +----+ + +----+ + +----+ + + +| | | | | | | | | | | | +| | | | | | | | | | | | ++ +----+----+ + + +----+ + + +----+ +----+----+ +----+----+----+----+ + +| | | | | | | | | | | +| | | | | | | | | | | ++----+----+ +----+----+----+ + + + + + +----+ +----+ + + + +----+ +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | ++ + + + + +----+----+ + + + +----+ +----+----+----+----+ + + + +| | | | | | | | | | | | +| | | | | | | | | | | | ++----+ + + +----+----+ + +----+----+----+ +----+----+ +----+----+ +----+ + +| | | | | | | | | | | | | +| | | | | | | | | | | | | ++ +----+ + +----+ + + +----+ + + + + +----+ + +----+ + + +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | ++ +----+----+ + +----+ + + +----+ +----+----+ +----+ + + +----+ + +| | | | | | | | | | | | +| | | | | | | | | | | | ++----+ + + +----+ +----+----+ +----+----+----+----+----+ + + +----+----+ + +| | | | | | | | | | +| | | | | | | | | | ++ + +----+----+ +----+ + +----+ +----+----+ + + + +----+ + + + +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | ++ + +----+----+----+ + +----+ +----+----+ + + + +----+----+----+ + + +| | | | | | | | | | | | +| | | | | | | | | | | | ++ +----+ + + +----+----+----+ +----+----+ + +----+----+ + + + +----+ +| | | | | | | | | | | | | +| | | | | | | | | | | | | ++ +----+----+ +----+ +----+----+ + + +----+----+ + +----+ + +----+ + +| | | | | | +| | | | | | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ + |