0.8.6.28:
authorChristophe Rhodes <csr21@cam.ac.uk>
Fri, 5 Dec 2003 16:56:20 +0000 (16:56 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Fri, 5 Dec 2003 16:56:20 +0000 (16:56 +0000)
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...)

INSTALL
src/compiler/float-tran.lisp
src/runtime/runtime.c
tests/compiler.impure.lisp
version.lisp-expr

diff --git a/INSTALL b/INSTALL
index 307e925..638ae75 100644 (file)
--- 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
index 49b9cc7..413ca99 100644 (file)
        ((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))
index 429eca3..72fc56a 100644 (file)
@@ -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 <http://www.sbcl.org/>.\
 \n\
 SBCL is free software, provided as is, with absolutely no warranty.\n\
index aa5ee2e..18622e1 100644 (file)
     (load source)
     (full-check)
     (delete-file fasl)))
-
+\f
+(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)))
 \f
 ;;;; tests not in the problem domain, but of the consistency of the
 ;;;; compiler machinery itself
index 04f41be..149ba8c 100644 (file)
@@ -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"