[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bignum branch
From: |
Paul Eggert |
Subject: |
bignum branch |
Date: |
Thu, 19 Jul 2018 13:32:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 07/18/2018 12:25 PM, Achim Gratz wrote:
the established FP math says these
two values should not compare equal anyway.
Sure, and = still does that. = is about numeric comparison; eql is about value
comparison. Neither dominates the other: for example, they disagree about 0.0 vs
-0.0 (= says they're equal, but eql says they're distinguishable values and so
are not equal), and conversely they disagree about 0.0e+NaN versus 0.0e+NaN (=
says they're not equal, whereas eql says they're indistinguishable values are so
are equal).
If you stray from that
convention there should be a really good reason for that and it needs to
be prominently documented.
There is good reason: eq, eql, and equal are about distinguishing objects (vital
for hash tables, e.g.) whereas = is about numeric comparison. These are
different things, and the numeric-comparison rule for NaNs is inconsistent with
how hash tables should work. I gave a shot at documenting this by installing the
attached patch.
0001-Improve-doc-for-floating-point-vs-eql.txt
Description: Text document
- Re: bignum branch, (continued)
- Re: bignum branch, Paul Eggert, 2018/07/18
- Re: bignum branch, Andy Moreton, 2018/07/18
- Re: bignum branch, Paul Eggert, 2018/07/18
- Re: bignum branch, Clément Pit-Claudel, 2018/07/18
- Re: bignum branch, Stefan Monnier, 2018/07/18
- Re: bignum branch, Clément Pit-Claudel, 2018/07/18
- Re: bignum branch, Andy Moreton, 2018/07/18
- Re: bignum branch, Achim Gratz, 2018/07/18
- Re: bignum branch, Stefan Monnier, 2018/07/18
- Re: bignum branch, Eli Zaretskii, 2018/07/18
- bignum branch,
Paul Eggert <=
- Re: bignum branch, Achim Gratz, 2018/07/20
- Re: bignum branch, Paul Eggert, 2018/07/20
- Re: bignum branch, Stefan Monnier, 2018/07/20
- Re: bignum branch, Achim Gratz, 2018/07/22
- Re: bignum branch, Paul Eggert, 2018/07/18
- Re: bignum branch, Andy Moreton, 2018/07/18
- Re: bignum branch, Paul Eggert, 2018/07/18
- Re: bignum branch, Andy Moreton, 2018/07/25