From 3646797b621e2607040f6272a79f449ee7c8ac66 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Tue, 2 Sep 2008 13:38:03 +0000
Subject: [PATCH] o A seed of 0 should be ok in INT-INIT-RANDOM-STATE. o Update
 link new initializer.

---
 code/rand-mt19937.lisp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/code/rand-mt19937.lisp b/code/rand-mt19937.lisp
index bb1569b15..e3647b565 100644
--- a/code/rand-mt19937.lisp
+++ b/code/rand-mt19937.lisp
@@ -6,7 +6,7 @@
 ;;; placed in the Public domain, and is provided 'as is'.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/rand-mt19937.lisp,v 1.18 2008/08/31 13:07:06 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/rand-mt19937.lisp,v 1.19 2008/09/02 13:38:03 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -66,7 +66,7 @@
       (logand (get-universal-time) #xffffffff)))
 
 ;; New initializer proposed by Takuji Nishimura and Makota Matsumoto.
-;; (See http://www.math.keio.ac.jp/~matumoto/MT2002/emt19937ar.html)
+;; (See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html)
 ;;
 ;; This corrects a deficiency in the original initializer wherein the
 ;; MSB of the seed was not well represented in the state.
@@ -85,7 +85,7 @@
 ;;
 
 (defun int-init-random-state (&optional (seed 5489) state)
-  (declare (type (integer 1 #xffffffff) seed))
+  (declare (type (integer 0 #xffffffff) seed))
   (let ((state (or state (make-array 627 :element-type '(unsigned-byte 32)))))
     (declare (type (simple-array (unsigned-byte 32) (627)) state))
     (setf (aref state 0) 0)
-- 
GitLab