From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Sat, 5 May 2018 01:03:30 -0400 Message-ID: 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> <63fdd138-77d3-89b9-aa69-490300f588a9@cs.ucla.edu> <838t90pr2l.fsf@gnu.org> <85ec3668-6b66-e47a-c10a-ffb3fc8be5d5@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1525496501 29433 195.159.176.226 (5 May 2018 05:01:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 5 May 2018 05:01:41 +0000 (UTC) Cc: eliz@gnu.org, Paul Eggert , eller.helmut@gmail.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 05 07:01:36 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 1fEpKC-0007YY-45 for ged-emacs-devel@m.gmane.org; Sat, 05 May 2018 07:01:36 +0200 Original-Received: from localhost ([::1]:37403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEpMG-0007YJ-D2 for ged-emacs-devel@m.gmane.org; Sat, 05 May 2018 01:03:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEpM9-0007Xz-MP for emacs-devel@gnu.org; Sat, 05 May 2018 01:03:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEpM6-0001bi-K3 for emacs-devel@gnu.org; Sat, 05 May 2018 01:03:37 -0400 Original-Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:35939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEpM6-0001b2-F4 for emacs-devel@gnu.org; Sat, 05 May 2018 01:03:34 -0400 Original-Received: by mail-qk0-x22c.google.com with SMTP id a202so18268526qkg.3 for ; Fri, 04 May 2018 22:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f0M1RRvMNnAouWu8BSEPI3Gm1iktOC0boLRMA8Pd/LE=; b=tq0QMarcCyYSEqwKq8IwlQurr5GDFfyEiR4CYAb27/NXwGo+AU6zHGETuxIu07erv4 i1hLLfQccr+UwEPkuUm2xXbneCP7PuppALyWnCW4wTL/xiBg6RO2S/l2ryvSkLikWYPK XUiNYtfailfaWpB/LyZzgMs9YAv8c7HoVexBVOw9lRrooJGBoDS3JAui/TkuiQInApnE 6uTVdGYIoA8lE5Pyl2qD/wWpAMozz+s4hWIHP2B5jHCDv4YsxeJGxdapMqpGfcOMSXH0 S9dMLMvpDyIcz3Y5mdVCfxurOQeqAn8Komu6BZp8D/IGfjzujbFGYPmKrTjcwmI/D/UJ 8BmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f0M1RRvMNnAouWu8BSEPI3Gm1iktOC0boLRMA8Pd/LE=; b=ODeelDsBJgLjXuXPl8nJ0ke1BS5w3Qu57f/ohW1LzfnuuEul3WfHYW4xIM7bl7NsW/ fIjkoAYmHmqFtI1VLHft41hJiMePXXPeBmQy2eTh2eDpHh6UOQfJ9xLg45uwi0qPFWbw xRjh9nZK642N1XRxRf5dIMYTZz6aWOdkCsqGx5LADesbPsmsgkRkyGbRoCw6dSJUEMH2 J+pKXxr4OVHP9xlQOM7+Fyb2l0BD0QNZJzhmwjw7sDbfTpTX4c1NokeHxMG6pjiOtoJo syGFpwVkicYBQu1RFv2dH/cq3MuFP27FSR09l2/yxCNtEuUgYaCbnA0j2ev+lj0DSIWJ AcWg== X-Gm-Message-State: ALQs6tAqpkW+/RZ5JPaxaeWMUjNlPrynRpaPKlgnlNhlcKhd9KFHgo40 61BxHD+Pgb9Dk7/4VgTCSwp58Q== X-Google-Smtp-Source: AB8JxZrzae5Cj7ld4/3zrNTbFW5Pw3rH9Dn3cYCorEbazOHbXOZkGxz1ZcOgsy5acfPqOisw0K44qQ== X-Received: by 10.55.128.199 with SMTP id b190mr24789008qkd.212.1525496613616; Fri, 04 May 2018 22:03:33 -0700 (PDT) Original-Received: from [192.168.23.135] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id q67sm15390467qki.97.2018.05.04.22.03.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 May 2018 22:03:32 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3445.5.20) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22c 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:225066 Archived-At: On May 4, 2018, at 00:26, Richard Stallman wrote: >=20 > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] >=20 > I don't think people want (format "%x" (lognot 257)) to output "-102". > Not on any platform. It isn't what code expects, and it isn't useful. >=20 > Perhaps, with bignums, lognot should take a width operand, measured = in bits. > So (lognot 257 32) would produce 0xfffffefe (a positive number) > and (lognot 257 64) would produce 0xfffffffffffffefe (a positive = number). >=20 > Another idea: %Nx with a negative number should output its 2's > complement representation in 4N bits. That's already taken: A leading =E2=80=9C-=E2=80=9C means to = left-justify the output if the specified width is wider than required. ELISP> (format "%-16x" 300) "12c " ELISP> (format "%16x" 300) " 12c" ELISP>=20