[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using the GNU GMP Library for Bignums in Emacs
From: |
Helmut Eller |
Subject: |
Re: Using the GNU GMP Library for Bignums in Emacs |
Date: |
Thu, 03 May 2018 08:26:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
On Wed, May 02 2018, Paul Eggert wrote:
> Richard Stallman wrote:
>> That means the feature would need to specify the number of hex digits
>> desired.
>
> We already have such a feature. For example, (format "%09x" 257) returns
> "000000101", which is 257 hexadecimal, expressed using leading zeros
> as needed so that at least 9 digits are used. Once Emacs supports
> bignums, the same feature can print 40-hex-digit SHA-1 checksums by
> using (format "%040x" n).
I think the bitwise operations and the resulting negative numbers are
the problematic part:
E.g.
(format "%016x" (lognot 257)) => "3ffffffffffffefe"
but the 16-hex-digit string should be "fffffffffffffefe".
Helmut
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/05/01
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/02
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs,
Helmut Eller <=
- Re: Using the GNU GMP Library for Bignums in Emacs, Eli Zaretskii, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/04
- Re: Using the GNU GMP Library for Bignums in Emacs, Ken Raeburn, 2018/05/05
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/05
- Re: Using the GNU GMP Library for Bignums in Emacs, Ken Raeburn, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Andreas Schwab, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Helmut Eller, 2018/05/03
- Message not available
- Re: Using the GNU GMP Library for Bignums in Emacs, Helmut Eller, 2018/05/03