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:
parent
0bafe73b5d
commit
0e12d408bd
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue