1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-07 12:40:19 +02:00

*** empty log message ***

This commit is contained in:
Mikael Djurfeldt 1999-01-21 09:32:45 +00:00
parent ec1bbf3918
commit 416075f1ee

18
NEWS
View file

@ -89,10 +89,10 @@ same type between zero (inclusive) and N (exclusive). The values
returned have a uniform distribution. returned have a uniform distribution.
The optional argument STATE must be of the type produced by The optional argument STATE must be of the type produced by
`(make-random-state)'. It defaults to the value of the variable `copy-random-state' or `seed->random-state'. It defaults to the value
`*random-state*'. This object is used to maintain the state of the of the variable `*random-state*'. This object is used to maintain the
pseudo-random-number generator and is altered as a side effect of state of the pseudo-random-number generator and is altered as a side
the `random' operation. effect of the `random' operation.
** New variable: *random-state* ** New variable: *random-state*
Holds a data structure that encodes the internal state of the Holds a data structure that encodes the internal state of the
@ -102,13 +102,17 @@ printed out and successfully read back in, but may or may not
function correctly as a random-number state object in another function correctly as a random-number state object in another
implementation. implementation.
** New function: make-random-state [STATE|SEED] ** New function: copy-random-state [STATE]
Returns a new object of type suitable for use as the value of the Returns a new object of type suitable for use as the value of the
variable `*random-state*' and as a second argument to `random'. variable `*random-state*' and as a second argument to `random'.
If argument STATE is given, a copy of it is returned. Otherwise a If argument STATE is given, a copy of it is returned. Otherwise a
copy of `*random-state*' is returned. copy of `*random-state*' is returned.
If SEED is given (a string or an integer), a new state is
generated and initialized using SEED. ** New function: seed->random-state SEED
Returns a new object of type suitable for use as the value of the
variable `*random-state*' and as a second argument to `random'.
SEED is a string or a number. A new state is generated and
initialized using SEED.
** New function: random:uniform [STATE] ** New function: random:uniform [STATE]
Returns an uniformly distributed inexact real random number in the Returns an uniformly distributed inexact real random number in the