1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

(real_eqv): Pretend that all NaNs are equal.

This commit is contained in:
Marius Vollmer 2004-09-08 14:32:47 +00:00
parent 0bafe73b5d
commit 0e12d408bd

View file

@ -58,7 +58,7 @@ SCM_DEFINE1 (scm_eq_p, "eq?", scm_tc7_rpsubr,
static int static int
real_eqv (double x, double y) 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> #include <stdio.h>