emacs-gpu/doc
Paul Eggert c70d22f70b Fix bug with eql etc. on NaNs
Fix a bug where eql, sxhash-eql, memql, and make-hash-table
were not consistent on NaNs.  Likewise for equal,
sxhash-equal, member, and make-hash-table.  Some of these
functions ignored NaN significands, whereas others treated
them as significant.  It's more logical to treat significands
as significant, and this typically makes eql a bit more
efficient on floats, with just one integer comparison instead
of one to three floating-point comparisons.
* doc/lispref/numbers.texi (Float Basics): Document that
NaNs are never numerically equal, but might be eql.
* src/fns.c (WORDS_PER_DOUBLE): Move to top level of this file.
(union double_and_words): Now named, and at the top level of this file.
(same_float): New function.
(Fmemql, Feql, internal_equal, cmpfn_eql): Use it, so that
the corresponding functions treat NaNs consistently.
(sxhash_float): Simplify based on above-mentioned changes.

* test/src/fns-tests.el (fns-tests-equality-nan): New test.
2018-07-18 03:18:53 -07:00
..
emacs Add to documentation of 'jump-to-register' 2018-07-14 15:14:25 +02:00
lispintro Merge from origin/emacs-26 2018-07-02 19:19:26 -07:00
lispref Fix bug with eql etc. on NaNs 2018-07-18 03:18:53 -07:00
man Merge from origin/emacs-26 2018-05-15 09:09:48 -07:00
misc Precise dav/davs in Tramp manual 2018-07-15 09:47:47 +02:00