From: Christophe Rhodes Date: Fri, 5 Dec 2003 16:56:20 +0000 (+0000) Subject: 0.8.6.28: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c3699db2053ff3b5ac6a98d4431c3789496002d8;p=sbcl.git 0.8.6.28: Fix for WTF bug on #lisp IRC ... adjust the EXPT derive-type logic to be more correct. Text adjustments ... refer to base-target-features.lisp-expr in INSTALL ... add our newline back after the first line of the banner (I hope without breaking gcc3.3 in the process...) --- diff --git a/INSTALL b/INSTALL index 307e925..638ae75 100644 --- a/INSTALL +++ b/INSTALL @@ -133,10 +133,12 @@ To build the system binaries: where it can be found. 3. If you like, you can tweak the *FEATURES* set for the resulting Lisp system, enabling or disabling features like documentation - strings or extra debugging code. The preferred way to do this is - by creating a file "customize-target-features.lisp", containing - a lambda expression which is applied to the default *FEATURES* - set and which returns the new *FEATURES* set, e.g. + strings, threads, or extra debugging code (see + "base-target-features.lisp-expr" for a list of recognized + *FEATURES*). The preferred way to do this is by creating a file + "customize-target-features.lisp", containing a lambda expression + which is applied to the default *FEATURES* set and which returns + the new *FEATURES* set, e.g. (LAMBDA (LIST) (ADJOIN :SB-SHOW (REMOVE :SB-DOC diff --git a/src/compiler/float-tran.lisp b/src/compiler/float-tran.lisp index 49b9cc7..413ca99 100644 --- a/src/compiler/float-tran.lisp +++ b/src/compiler/float-tran.lisp @@ -906,17 +906,21 @@ ((csubtypep y (specifier-type 'integer)) ;; A real raised to an integer power is well-defined. (merged-interval-expt x y)) + ;; A real raised to a non-integral power can be a float or a + ;; complex number. + ((or (csubtypep x (specifier-type '(rational 0))) + (csubtypep x (specifier-type '(float (0d0))))) + ;; But a positive real to any power is well-defined. + (merged-interval-expt x y)) + ((and (csubtypep x (specifier-type 'rational)) + (csubtypep x (specifier-type 'rational))) + ;; A rational to the power of a rational could be a rational + ;; or a possibly-complex single float + (specifier-type '(or rational single-float (complex single-float)))) (t - ;; A real raised to a non-integral power can be a float or a - ;; complex number. - (cond ((or (csubtypep x (specifier-type '(rational 0))) - (csubtypep x (specifier-type '(float (0d0))))) - ;; But a positive real to any power is well-defined. - (merged-interval-expt x y)) - (t - ;; a real to some power. The result could be a real - ;; or a complex. - (float-or-complex-float-type (numeric-contagion x y))))))) + ;; a real to some power. The result could be a real or a + ;; complex. + (float-or-complex-float-type (numeric-contagion x y))))) (defoptimizer (expt derive-type) ((x y)) (two-arg-derive-type x y #'expt-derive-type-aux #'expt)) diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 429eca3..72fc56a 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -166,6 +166,7 @@ print_banner() { printf( "This is SBCL %s, an implementation of ANSI Common Lisp.\n\ +\n\ More information about SBCL is available at .\ \n\ SBCL is free software, provided as is, with absolutely no warranty.\n\ diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index aa5ee2e..18622e1 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -865,7 +865,12 @@ (load source) (full-check) (delete-file fasl))) - + +(defun expt-derive-type-bug (a b) + (unless (< a b) + (truncate (expt a b)))) +(assert (equal (multiple-value-list (expt-derive-type-bug 1 1)) + '(1 0))) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself diff --git a/version.lisp-expr b/version.lisp-expr index 04f41be..149ba8c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.6.27" +"0.8.6.28"