diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -2169,7 +2169,15 @@ internal_equal (o1, o2, depth) | |||
| 2169 | switch (XTYPE (o1)) | 2169 | switch (XTYPE (o1)) |
| 2170 | { | 2170 | { |
| 2171 | case Lisp_Float: | 2171 | case Lisp_Float: |
| 2172 | return (extract_float (o1) == extract_float (o2)); | 2172 | { |
| 2173 | double d1, d2; | ||
| 2174 | |||
| 2175 | d1 = extract_float (o1); | ||
| 2176 | d2 = extract_float (o2); | ||
| 2177 | /* If d is a NaN, then d != d. Two NaNs should be `equal' even | ||
| 2178 | though they are not =. */ | ||
| 2179 | return d1 == d2 || (d1 != d1 && d2 != d2); | ||
| 2180 | } | ||
| 2173 | 2181 | ||
| 2174 | case Lisp_Cons: | 2182 | case Lisp_Cons: |
| 2175 | if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1)) | 2183 | if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1)) |