[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using the GNU GMP Library for Bignums in Emacs
From: |
Ken Raeburn |
Subject: |
Re: Using the GNU GMP Library for Bignums in Emacs |
Date: |
Sun, 22 Jul 2018 08:06:02 -0400 |
On Jul 18, 2018, at 06:20, Paul Eggert <address@hidden> wrote:
>
> Stefan Monnier wrote:
>> I recently posted a patch which makes EQ behave like `eql` attached.
>> I just tried to see its impact on the ELisp compilation time
>> (i.e. I did `rm **/*.elc; make`).
>
> I tried to reproduce this on my machine, and ran into some trouble (the code
> had warnings that caused compilation to fail). Although your patch is
> evidently intended only as a quick benchmark and not as an actual change, I
> worry that the benchmark isn't realistic enough, as some usage of EQ in C
> code will need to change to Feql or equivalent. Also, the C code will need to
> change how hashing works since XHASH etc. must be consistent with eq.
>
> Looking into this a bit more, I discovered that eql currently operates
> incorrectly on NaNs, as it's inconsistent with how hash tables work. I
> installed the attached patch into master to fix that.
If we’re going to treat NaNs as having distinguishable bit patterns so we can
tell whether two are the same or not, should we also have printable/readable
forms that distinguish them? If not, how do we create and use distinguishable
NaNs?
For that matter, are we guaranteed that operations like (/ 0.0 0.0) will always
generate NaNs with the same bit pattern?
I would’ve guessed that it might be preferable to go the other direction, and
use one canonical NaN value in Lisp, which would thus always be eq/eql to all
other NaN expressions.
Ken
- Re: Making 'eq' == 'eql' in bignum branch, (continued)
- Re: Making 'eq' == 'eql' in bignum branch, Stefan Monnier, 2018/07/29
- Re: Making 'eq' == 'eql' in bignum branch, Eli Zaretskii, 2018/07/29
- Re: Making 'eq' == 'eql' in bignum branch, Stefan Monnier, 2018/07/30
- Re: Making 'eq' == 'eql' in bignum branch, Eli Zaretskii, 2018/07/30
- Re: Making 'eq' == 'eql' in bignum branch, Stefan Monnier, 2018/07/30
- Re: Making 'eq' == 'eql' in bignum branch, Paul Eggert, 2018/07/30
- Re: Making 'eq' == 'eql' in bignum branch, Eli Zaretskii, 2018/07/30
- Re: Making 'eq' == 'eql' in bignum branch, Paul Eggert, 2018/07/31
- Re: Using the GNU GMP Library for Bignums in Emacs, Eli Zaretskii, 2018/07/18
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/07/18
- Re: Using the GNU GMP Library for Bignums in Emacs,
Ken Raeburn <=
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/07/22
- Re: Using the GNU GMP Library for Bignums in Emacs, Achim Gratz, 2018/07/22