From fdd6c2add9da521cb34738ce272e03ebf561f93d Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 24 Apr 2003 08:55:34 +0000 Subject: [PATCH] 0.pre8.99: One more -0.0/0.0 fix: ... numeric type ranges should be compared with EQUALP, not EQUAL, to make (FLOAT 0.0) be the same as (FLOAT -0.0) --- src/code/late-type.lisp | 4 ++-- tests/type.impure.lisp | 5 +++++ version.lisp-expr | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index e4a17df..c8c76ea 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -1417,8 +1417,8 @@ (and (eq (numeric-type-class type1) (numeric-type-class type2)) (eq (numeric-type-format type1) (numeric-type-format type2)) (eq (numeric-type-complexp type1) (numeric-type-complexp type2)) - (equal (numeric-type-low type1) (numeric-type-low type2)) - (equal (numeric-type-high type1) (numeric-type-high type2))) + (equalp (numeric-type-low type1) (numeric-type-low type2)) + (equalp (numeric-type-high type1) (numeric-type-high type2))) t)) (!define-type-method (number :unparse) (type) diff --git a/tests/type.impure.lisp b/tests/type.impure.lisp index d07044f..7bd27fb 100644 --- a/tests/type.impure.lisp +++ b/tests/type.impure.lisp @@ -224,6 +224,11 @@ (assert-t-t (subtypep '(not (single-float 0.0 0.0)) '(not (member 0.0)))) (assert-t-t (subtypep '(not (double-float 0.0d0 0.0d0)) '(not (member 0.0d0)))) + +(assert-t-t (subtypep '(float -0.0) '(float 0.0))) +(assert-t-t (subtypep '(float 0.0) '(float -0.0))) +(assert-t-t (subtypep '(float (0.0)) '(float (-0.0)))) +(assert-t-t (subtypep '(float (-0.0)) '(float (0.0)))) ;;;; Douglas Thomas Crosher rewrote the CMU CL type test system to ;;;; allow inline type tests for CONDITIONs and STANDARD-OBJECTs, and diff --git a/version.lisp-expr b/version.lisp-expr index d76e8b0..95102c4 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.pre8.98" +"0.pre8.99" -- 1.7.10.4