(random) isn't random
Bug #1600654 reported by
alexdunn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The following command always writes 92:
```
sbcl --non-interactive --no-sysinit --no-userinit --eval '(write-line (write-to-string (random 256)))'
```
Within a session, successive invocations of (random 256) will return the same series of numbers: 92, 246, 238, 121, 44, 223, 5...
Tested with SBCL 1.3.7 and with the git HEAD at 5d2d20fd81585b1
To post a comment you must log in.
Well, you have to seed the random state with (setf *random-state* (make-random-state t))...