X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fnumbers.lisp;h=58fdb29d36177078bbda7063316cc6782f681f95;hb=d3af5593ffff1c39a2f8fa8113704803f347e22f;hp=1c405559c030c18a9d8362ee36f869da4cfb855b;hpb=332e4d9a78b7af76d0c8da2a7cafda5a3c556036;p=sbcl.git diff --git a/src/code/numbers.lisp b/src/code/numbers.lisp index 1c40555..58fdb29 100644 --- a/src/code/numbers.lisp +++ b/src/code/numbers.lisp @@ -363,9 +363,9 @@ (,op (imagpart x) (imagpart y)))) (((foreach bignum fixnum ratio single-float double-float #!+long-float long-float) complex) - (complex (,op x (realpart y)) (,op (imagpart y)))) + (complex (,op x (realpart y)) (,op 0 (imagpart y)))) ((complex (or rational float)) - (complex (,op (realpart x) y) (imagpart x))) + (complex (,op (realpart x) y) (,op (imagpart x) 0))) (((foreach fixnum bignum) ratio) (let* ((dy (denominator y)) @@ -855,10 +855,10 @@ the first." ;; conversion. (multiple-value-bind (lo hi) (case '(dispatch-type y) - ('single-float + (single-float (values most-negative-exactly-single-float-fixnum most-positive-exactly-single-float-fixnum)) - ('double-float + (double-float (values most-negative-exactly-double-float-fixnum most-positive-exactly-double-float-fixnum))) (if (<= lo y hi) @@ -872,10 +872,10 @@ the first." ;; Likewise (multiple-value-bind (lo hi) (case '(dispatch-type x) - ('single-float + (single-float (values most-negative-exactly-single-float-fixnum most-positive-exactly-single-float-fixnum)) - ('double-float + (double-float (values most-negative-exactly-double-float-fixnum most-positive-exactly-double-float-fixnum))) (if (<= lo y hi) @@ -1458,7 +1458,7 @@ the first." (do-mfuns sb!c::*untagged-unsigned-modular-class*) (do-mfuns sb!c::*untagged-signed-modular-class*) (do-mfuns sb!c::*tagged-modular-class*))) - `(progn ,@(forms))) + `(progn ,@(sort (forms) #'string< :key #'cadr))) ;;; KLUDGE: these out-of-line definitions can't use the modular ;;; arithmetic, as that is only (currently) defined for constant