Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
74a47d1f
Commit
74a47d1f
authored
Dec 29, 2003
by
Eli Zaretskii
Browse files
(internal_equal): Return t for two NaN arguments.
parent
d9c4f512
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/fns.c
src/fns.c
+9
-1
No files found.
src/fns.c
View file @
74a47d1f
...
...
@@ -2169,7 +2169,15 @@ internal_equal (o1, o2, depth)
switch (XTYPE (o1))
{
case Lisp_Float:
return (extract_float (o1) == extract_float (o2));
{
double d1, d2;
d1 = extract_float (o1);
d2 = extract_float (o2);
/* If d is a NaN, then d != d. Two NaNs should be `equal' even
though they are not =. */
return d1 == d2 || (d1 != d1 && d2 != d2);
}
case Lisp_Cons:
if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment