emacs-devel
[Top][All Lists]
Advanced

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

Re: Using the GNU GMP Library for Bignums in Emacs


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

Helmut Eller wrote:
(format "%x" -1) => "3fffffffffffffff".

Any program that assumes that behavior is already unportable, since the expression returns "3fffffff" on 32-bit platforms.

The usual approach for this is to format negative numbers with a leading minus sign, so that (format "%x" -1) returns "-1". This is what Emac Lisp should have been doing anyway as it is more intuitive and more portable. Obviously there will be compatibility concerns here, and we'll need to address them.



reply via email to

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