From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Mon, 30 Apr 2018 01:00:59 -0400 Message-ID: <871sexe19w.fsf@md5i.com> References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <83bmecy6fx.fsf@gnu.org> <0d3175d8-d996-651e-b221-71978bde3a65@cs.ucla.edu> <42cbc5ab-2f02-4aa5-4b19-7b2357f91692@cs.ucla.edu> <1f58acbf-a7d8-bf4e-3d0e-a285515a22e6@cs.ucla.edu> <2549728d-8e40-b46a-009e-07cef0c24208@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525064346 7775 195.159.176.226 (30 Apr 2018 04:59:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2018 04:59:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 30 06:59:02 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fD0ty-0001wA-0M for ged-emacs-devel@m.gmane.org; Mon, 30 Apr 2018 06:59:02 +0200 Original-Received: from localhost ([::1]:57801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD0w4-0002r0-Me for ged-emacs-devel@m.gmane.org; Mon, 30 Apr 2018 01:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD0vv-0002qo-EL for emacs-devel@gnu.org; Mon, 30 Apr 2018 01:01:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fD0vs-0008UJ-Cr for emacs-devel@gnu.org; Mon, 30 Apr 2018 01:01:03 -0400 Original-Received: from md5i.com ([75.151.244.229]:58196) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fD0vs-0008Tx-7Q for emacs-devel@gnu.org; Mon, 30 Apr 2018 01:01:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=284/cKUmTSj8bCZWHRlWvwofSMcWNauiBU2VVt4wL3A=; b=dydd8dgQNIoiYEf2G/F33Xm+4G iH3l0oOUJmnOB/gn6u2+wVPCO0j08ZlQjT+S0+OHFOHg4eKs5gqEQoVBWNwRaGVBtk2l/o2fU8eGP VxXc2WWXm7suM5buYAStH5eW2; Original-Received: from md5i by md5i.com with local (Exim 4.91) (envelope-from ) id 1fD0vr-0007n2-7g for emacs-devel@gnu.org; Mon, 30 Apr 2018 01:00:59 -0400 In-Reply-To: (Richard Stallman's message of "Sun, 29 Apr 2018 23:07:04 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 75.151.244.229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224974 Archived-At: Richard Stallman 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 (md5i@md5i.com)