From 70353c2a9c5c9a3f70fed8985119e34d3fd95a10 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Fri, 5 Jun 1992 18:45:12 +0000 Subject: [PATCH] Fixed RANDOM derive-type method when the class is NIL, or is FLOAT and FORMAT is specified (need to get the right type of zero.) --- compiler/srctran.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/srctran.lisp b/compiler/srctran.lisp index 98806e471..d5791b5f6 100644 --- a/compiler/srctran.lisp +++ b/compiler/srctran.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.36 1992/04/08 03:48:16 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.37 1992/06/05 18:45:12 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -510,11 +510,12 @@ (let ((type (continuation-type bound))) (when (numeric-type-p type) (let ((class (numeric-type-class type)) - (high (numeric-type-high type))) + (high (numeric-type-high type)) + (format (numeric-type-format type))) (make-numeric-type :class class - :format (numeric-type-format type) - :low (coerce 0 class) + :format format + :low (coerce 0 (or format class 'real)) :high (cond ((not high) nil) ((eq class 'integer) (max (1- high) 0)) ((or (consp high) (zerop high)) high) -- GitLab