From 0e12d408bd26355481fae0a66c38d2ef1367cea0 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 8 Sep 2004 14:32:47 +0000 Subject: [PATCH] (real_eqv): Pretend that all NaNs are equal. --- libguile/eq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/eq.c b/libguile/eq.c index e7d4b0ce1..a067c5001 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -58,7 +58,7 @@ SCM_DEFINE1 (scm_eq_p, "eq?", scm_tc7_rpsubr, static int real_eqv (double x, double y) { - return !memcmp (&x, &y, sizeof(double)); + return !memcmp (&x, &y, sizeof(double)) || (x != x && y != y); } #include