[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: Michael Welsh Duggan
Subject: Re: Using the GNU GMP Library for Bignums in Emacs
Date: Mon, 30 Apr 2018 01:00:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Richard Stallman <address@hidden> writes:

>   > However, I don't see why assuming 64 bits would mean that the argument 
>   > would cease to be valid. Even with that assumption, we would continue 
>   > have the same problem with numbers like #xffffffffffffffff that exceed 
>   > Emacs fixnum range when words are 64 bits.
> I expect that %x is used only for values meant to interact
> with the operating system in certain ways, and that _most of_ those
> values will never be more than 32 bits.
> I could be mistaken in this, but it is a factual question.
> Where else do people use %x?

Well, although I admit I most often use hexadecimal numbers to represent
machine addresses (including on 64-bit addresses, of course), I also use
them to represent memory offsets.  I only bring this up because this is
a case when a negative hexadecimal number (-#x1000 or -0x1000) is a more
useful representation than two's complement.

I admit that this may be considered a niche use, however, and I am
seldom working with offsets of sizes greater than 32 bits in size.  I
will further admit that I have never needed this in Emacs, but have run
into this problem with writing C and C++ code, since I have been doing a
lot of work lately on static binary analysis.

Michael Welsh Duggan

reply via email to

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