(real_eqv): Pretend that all NaNs are equal.
authorMarius Vollmer <mvo@zagadka.de>
Wed, 8 Sep 2004 14:32:47 +0000 (14:32 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Wed, 8 Sep 2004 14:32:47 +0000 (14:32 +0000)
libguile/eq.c

index e7d4b0c..a067c50 100644 (file)
@@ -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 <stdio.h>