From 2460afd80ee3a113d1528f04aac90a55fe1a636c Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 24 Sep 2003 18:49:46 +0000 Subject: [PATCH] * According to r4rs section 6.2, (eqv? 1 1.0) returns #f. git-svn-id: svn://svn.zoy.org/elk/trunk@187 55e467fa-43c5-0310-a8a2-de718669efc6 --- src/bool.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bool.c b/src/bool.c index b231515..917bef2 100644 --- a/src/bool.c +++ b/src/bool.c @@ -62,8 +62,13 @@ int Eqv (Object x1, Object x2) { return 1; t1 = TYPE(x1); t2 = TYPE(x2); - if (Numeric (t1) && Numeric (t2)) + if (Numeric (t1) && Numeric (t2)) { + /* r4rs 6.2 states that (eqv? 1 1.0) ==> #f */ + if(t1 == T_Flonum && t2 != T_Flonum + || t1 != T_Flonum && t2 == T_Flonum) + return 0; return Generic_Equal (x1, x2); + } if (t1 != t2) return 0; switch (t1) {