From 4ee91d3792fad500e2b2b9e5d51cc031df7a65a4 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Thu, 6 Jul 2000 04:38:39 +0000
Subject: [PATCH] Fix elfun-derive-type-simple and trig-derive-type-aux to
 return (complex float) types even when passed a (complex rational) or
 (complex integer).

---
 compiler/float-tran.lisp | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/compiler/float-tran.lisp b/compiler/float-tran.lisp
index d16b98564..e4535df26 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.81 2000/04/02 18:45:09 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/float-tran.lisp,v 1.82 2000/07/06 04:38:39 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -695,9 +695,7 @@
   (etypecase arg
     (numeric-type
      (cond ((eq (numeric-type-complexp arg) :complex)
-	    (make-numeric-type :class (numeric-type-class arg)
-			       :format (numeric-type-format arg)
-			       :complexp :complex))
+	    (complex-float-type arg))
 	   ((numeric-type-real-p arg)
 	    ;; The argument is real, so let's find the intersection
 	    ;; between the argument and the domain of the function.
@@ -1330,9 +1328,7 @@
   (etypecase arg
     (numeric-type
      (cond ((eq (numeric-type-complexp arg) :complex)
-	    (make-numeric-type :class (numeric-type-class arg)
-			       :format (numeric-type-format arg)
-			       :complexp :complex))
+	    (complex-float-type arg))
 	   ((numeric-type-real-p arg)
 	    (let* ((format (case (numeric-type-class arg)
 			     ((integer rational) 'single-float)
@@ -1405,8 +1401,7 @@
 (defoptimizer (cis derive-type) ((num))
   (one-arg-derive-type num
      #'(lambda (arg)
-	 (c::specifier-type
-	  `(complex ,(or (numeric-type-format arg) 'float))))
+	 (specifier-type `(complex ,(or (numeric-type-format arg) 'float))))
      #'cis))
 
 ) ; end progn
-- 
GitLab