make_random_state broken for Maxima installed with Ecl
Subject: make_random_state broken for Maxima installed with Ecl
From: Robert Dodier
Date: Thu, 28 Aug 2008 14:56:34 -0600
On Thu, Aug 28, 2008 at 1:29 PM, Oliver Kullmann
<O.Kullmann at swansea.ac.uk> wrote:
> (%i1) make_random_state(0)$
> Maxima encountered a Lisp error:
>
> The value of MT19937::SEED is 0, which is not of type (INTEGER 1 4294967295).
After looking at maxima/src/rand-mt19937.lisp, maybe ECL is correct.
Near line 66 it says:
(defun int-init-random-state (&optional (seed 5489) state)
(declare (type (integer 1 #xffffffff) seed))
That seems to exclude 0.
> according to the documentation, 0 is a valid argument for make_random_state?
Well, maybe we can relax the type check to include 0,
but until then maybe the documentation should say that 0 is excluded.
best
Robert Dodier