[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bignum branch
From: |
Stefan Monnier |
Subject: |
Re: bignum branch |
Date: |
Wed, 18 Jul 2018 16:41:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> NaN (specifically of the IEEE754 variety) is supposed to compare
> non-equal even when compared to itself.
There's "compare" and there's "compare".
I think we always want (eql x x) to return t, so the above behavior
makes a lot of sense. The rule that NaN is not equal to itself should
only be applied when doing a numerical comparison (i.e. (= x x) may
return nil).
> I recognize that eql is used in the above, but that would probably
> still create two LISP objects that happen to have the same value, but
> the established FP math says these two values should not compare equal
> anyway. If you stray from that convention there should be a really
> good reason for that and it needs to be prominently documented.
NaNs are a minefield. I understand there are good reasons for this
minefield, but it's good practice to try and confine the pain to those
places where it is indispensable.
Stefan
- Re: bignum branch, (continued)
- Re: bignum branch, Paul Eggert, 2018/07/17
- Re: bignum branch, Eli Zaretskii, 2018/07/17
- 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 <=
- Re: bignum branch, Eli Zaretskii, 2018/07/18
- bignum branch, Paul Eggert, 2018/07/19
- 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