[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the GNU GMP Library for Bignums in Emacs

From: Daniel Colascione
Subject: Re: Using the GNU GMP Library for Bignums in Emacs
Date: Sun, 22 Apr 2018 11:04:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/22/2018 10:43 AM, Paul Eggert wrote:
Philipp Stephani wrote:
integers are currently documented to use modular arithmetic (

We'll need to change the documentation for modular arithmetic, since integers will no longer overflow.

Bugs will inevitably arise. One possibility is just dealing with them; another might be to predicate bignum support on a lexical-binding-like flag.

and they are documented to be pure value types, i.e. same-valued integers
are the same objects. Especially the second property is widely used.

This property is used only for fixnums now (since bignums do not exist yet), and we can keep this property for fixnums. We could also keep it for bignums, by hashing all bignums, though I doubt whether it's worth the expense.

That's a good idea, IMHO. It preserves identity without complicating eq itself.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]