summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-12-17 21:09:26 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-12-17 21:09:26 -0800
commit0e696e94cdf30c3b5a14a36f2636d1cfe55d5d34 (patch)
tree5ee9ad31559caf490cccfc1790d57c7740a3232f /txr.1
parent293366c3410893f6937b507e2ca1f7ab192f1ad2 (diff)
downloadtxr-0e696e94cdf30c3b5a14a36f2636d1cfe55d5d34.tar.gz
txr-0e696e94cdf30c3b5a14a36f2636d1cfe55d5d34.tar.bz2
txr-0e696e94cdf30c3b5a14a36f2636d1cfe55d5d34.zip
* rand.c (rand32): Bugfix: if the seed object is a random
state, we do not want to make the 8 calls to rand32 to mix up the state; we need are making a straight copy. * txr.1: Document the possibility that the seed object is a random state. Document the platform-independence of the integer seed.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.111
1 files changed, 10 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 0c3ab384..33cfdfee 100644
--- a/txr.1
+++ b/txr.1
@@ -22992,7 +22992,8 @@ an object of the same kind as what is stored in the
.code *random-state*
variable.
-The seed, if specified, must be an integer value.
+The seed, if specified, must be either an integer value, or an
+existing random state object.
Note that the sign of the seed is ignored, so that negative seed
values are equivalent to their additive inverses.
@@ -23010,6 +23011,14 @@ On a platform with a millisecond-resolution real-time clock, the minimum
time increment is a millisecond. Calls to make-random-state less than
a millisecond apart may predictably produce the same seed.
+If an integer seed is specified, then the integer value is mapped to a
+pseudo-random sequence, in a platform-independent way.
+
+If a random state is specified as a seed, then it is duplicated. The
+returned random state object is a distinct object which is in the same
+state as the input object. It will produce the same remaining pseudo-random
+number sequence, as will the input object.
+
.coNP Function @ random-state-p
.synb
.mets (random-state-p << obj )