From 18894485f7022ad30a250c0aca2c00308a4c33db Mon Sep 17 00:00:00 2001
From: gerd <gerd>
Date: Sun, 7 Sep 2003 11:48:29 +0000
Subject: [PATCH] 	(defun foo (x) (float x 1f0)) 	(compile 'foo) 	(foo
 0d0) 	 => 0d0

	Found by Paul Dietz with sqrt on complex numbers.

	* src/compiler/float-tran.lisp (float) <deftransform>:
	Test with single-float-p instead of floatp.
---
 compiler/float-tran.lisp     | 4 ++--
 general-info/release-19a.txt | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/float-tran.lisp b/compiler/float-tran.lisp
index 179c62598..1f4c0469d 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.93 2003/09/05 15:35:32 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.94 2003/09/07 11:48:29 gerd Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -24,7 +24,7 @@
 
 (deftransform float ((n &optional f) (* &optional single-float) *
 		     :when :both)
-  '(if (floatp n)
+  '(if (single-float-p n)
        n
        (%single-float n)))
 
diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt
index 22e6f5540..8b31579ff 100644
--- a/general-info/release-19a.txt
+++ b/general-info/release-19a.txt
@@ -177,6 +177,7 @@ New in this release:
        similar cases.
      - GCD sometimes returning a negative value.
      - LCM sometimes returning a negative value, or signaling division-by-zero.
+     - FLOAT in sometimes returning a float of the wrong type.
 
   * Other changes:
      - CREATE-REQUEST-SERVER has an additional :reuse-address keyword
-- 
GitLab