diff --git a/ChangeLog b/ChangeLog index 0b96338..438d658 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-20 Rudy Neeser + + * random.lisp (make-random-vector): Ensure that the type placed + into the created vector is a double-float. + 2010-10-16 Rudy Neeser * vector.lisp (print-object): Have vectors print their identity in diff --git a/random.lisp b/random.lisp index 7464a9b..8a7f849 100644 --- a/random.lisp +++ b/random.lisp @@ -1,3 +1,4 @@ +(declaim (optimize (speed 0) (safety 3) (debug 3))) (in-package #:l-math) ;;; L-MATH: a library for simple linear algebra. @@ -74,7 +75,7 @@ of the returned value depends on the type of min and max." (type function noise)) (let ((result (make-vector dimension))) (do-each-vector-element (el result) - (setf el (funcall noise))) + (setf el (coerce (funcall noise) 'double-float))) result)) (defun make-random-matrix (rows cols &key (noise #'normal))