X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Firrat.lisp;h=c22fd9311fee9f5244896123f33ead151bacab85;hb=62c09fabe8aa8f1bd75bf4db4c20e195a1b6bc1d;hp=7fce0687b2aefad13f08dcafb96fae1783fd4381;hpb=b953c186cfe68e48801cb54715da0120c9580888;p=sbcl.git diff --git a/src/code/irrat.lisp b/src/code/irrat.lisp index 7fce068..c22fd93 100644 --- a/src/code/irrat.lisp +++ b/src/code/irrat.lisp @@ -701,9 +701,11 @@ (defun coerce-to-complex-type (x y z) (declare (double-float x y) (number z)) - (if (subtypep (type-of (realpart z)) 'double-float) + (if (typep (realpart z) 'double-float) (complex x y) - ;; Convert anything that's not a DOUBLE-FLOAT to a SINGLE-FLOAT. + ;; Convert anything that's not already a DOUBLE-FLOAT (because + ;; the initial argument was a (COMPLEX DOUBLE-FLOAT) and we + ;; haven't done anything to lose precision) to a SINGLE-FLOAT. (complex (float x 1f0) (float y 1f0))))