From e6aa9123801451d84f97a36b88ac5f0ed6fc8999 Mon Sep 17 00:00:00 2001 From: toy <toy> Date: Tue, 2 Sep 2003 01:22:01 +0000 Subject: [PATCH] DEFTRANSFORM for FLOAT needs to check if the number is a float before calling %SINGLE-FLOAT which converts everything to a single-float. (Noted by Christophe Rhodes on #lisp.) --- compiler/float-tran.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/float-tran.lisp b/compiler/float-tran.lisp index a45a75892..49ba1a2b1 100644 --- a/compiler/float-tran.lisp +++ b/compiler/float-tran.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.90 2003/07/03 17:13:30 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.91 2003/09/02 01:22:01 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -24,7 +24,9 @@ (deftransform float ((n &optional f) (* &optional single-float) * :when :both) - '(%single-float n)) + '(if (floatp n) + n + (%single-float n))) (deftransform float ((n f) (* double-float) * :when :both) '(%double-float n)) -- GitLab