emacs-devel
[Top][All Lists]
Advanced

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

Re: integer overflow handling for most-negative-fixnum


From: Helmut Eller
Subject: Re: integer overflow handling for most-negative-fixnum
Date: Sat, 21 Jul 2018 23:02:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> Second, we change (format "%x" -1) to return "-1" rather than a
>> machine-dependent string like "3fffffffffffffff" as it does now. That
>> would make Elisp be more machine-independent, would solve Andy's
>> problem, and would solve other problems once we have bignums, and in
>> hindsight it's what we should have done originally.
>
> Can't you simply use some other character for this, like %z (or %ℤ) and
> leave %x alone.

%a also seems like a candidate: in C99 %a prints floating point numbers
in hexadecimal notation.  That might be useful so that Emacs can
write/read floats without rounding errors.  It seems fairly natural to
use the same format specifier for bignums too.

Helmut




reply via email to

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