From 250e3912fd294583aba0b8ab46296b12c6c187d0 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Thu, 13 May 2004 12:03:49 +0000
Subject: [PATCH] Are 0.0 and -0.0 'of the same type'?  Add checks for paranoia

---
 ansi-tests/sxhash.lsp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ansi-tests/sxhash.lsp b/ansi-tests/sxhash.lsp
index 7670445d..8155831e 100644
--- a/ansi-tests/sxhash.lsp
+++ b/ansi-tests/sxhash.lsp
@@ -158,7 +158,9 @@
 	for c2 in '(-0.0s0 -0.0f0 -0.0d0 -0.0l0)
 	for sx1 = (sxhash c1)
 	for sx2 = (sxhash c2)
-	unless (eql sx1 sx2)
+	unless (or (not (typep c1 (type-of c2)))
+		   (not (typep c2 (type-of c1)))
+		   (eql sx1 sx2))
 	collect (list c1 c2 sx1 sx2))
   nil)
 
@@ -169,7 +171,9 @@
 	for c2 = (complex r2)
 	for sx1 = (sxhash c1)
 	for sx2 = (sxhash c2)
-	unless (eql sx1 sx2)
+	unless (or (not (typep c1 (type-of c2)))
+		   (not (typep c2 (type-of c1)))
+		   (eql sx1 sx2))
 	collect (list c1 c2 sx1 sx2))
   nil)
 
@@ -180,7 +184,9 @@
 	for c2 = (complex 0 r2)
 	for sx1 = (sxhash c1)
 	for sx2 = (sxhash c2)
-	unless (eql sx1 sx2)
+	unless (or (not (typep c1 (type-of c2)))
+		   (not (typep c2 (type-of c1)))
+		   (eql sx1 sx2))
 	collect (list c1 c2 sx1 sx2))
   nil)
 
-- 
GitLab