From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#32463: 27.0.50; (logior -1) => 4611686018427387903 Date: Sat, 18 Aug 2018 15:56:55 -0700 Organization: UCLA Computer Science Department Message-ID: <5230a57b-5896-606d-f157-2e547710b6e8@cs.ucla.edu> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534632972 17853 195.159.176.226 (18 Aug 2018 22:56:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Aug 2018 22:56:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: 32463@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 19 00:56:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1frA8d-0004Ts-1l for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2018 00:56:07 +0200 Original-Received: from localhost ([::1]:40756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frAAh-0007ua-HD for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Aug 2018 18:58:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frAAX-0007tP-RH for bug-gnu-emacs@gnu.org; Sat, 18 Aug 2018 18:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frAAU-0001Hn-NC for bug-gnu-emacs@gnu.org; Sat, 18 Aug 2018 18:58:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49287) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frAAU-0001Hf-IJ for bug-gnu-emacs@gnu.org; Sat, 18 Aug 2018 18:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1frAAU-0008Lw-B9 for bug-gnu-emacs@gnu.org; Sat, 18 Aug 2018 18:58:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Aug 2018 22:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32463-submit@debbugs.gnu.org id=B32463.153463302532015 (code B ref 32463); Sat, 18 Aug 2018 22:58:02 +0000 Original-Received: (at 32463) by debbugs.gnu.org; 18 Aug 2018 22:57:05 +0000 Original-Received: from localhost ([127.0.0.1]:54305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frA9Z-0008KJ-6D for submit@debbugs.gnu.org; Sat, 18 Aug 2018 18:57:05 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frA9X-0008Jn-Fg for 32463@debbugs.gnu.org; Sat, 18 Aug 2018 18:57:03 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E2D9916081D; Sat, 18 Aug 2018 15:56:57 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BZVn0lW8i6Oy; Sat, 18 Aug 2018 15:56:56 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D5F6E160825; Sat, 18 Aug 2018 15:56:56 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id J0yquey7Vcj1; Sat, 18 Aug 2018 15:56:56 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 87EAF16081D; Sat, 18 Aug 2018 15:56:56 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149583 Archived-At: > I'm not sure what is on your list of remaining issues, but here is mine: > > a) A bug in bignumcompare for 64bit Windows. Patch is here: > http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00487.html That patch doesn't go far enough, I'm afraid, as there are other bugs in bignum comparison. For example, NaNs vs bignums don't always work. And while we're in the neighborhood one can more cheaply compare a fixnum to a bignum by simply looking at the bignum's sign, as the numeric values don't matter in that case. This item is first on my list of things to fix partly because it's relatively easy. > b) fmod_float has a bug: > http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00442.html > > c) Extend Fexpt to support bignums. Patch is here: > http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00503.html > > d) Extend Fceiling, Ffloor, Fround and Ftruncate to support bignums by > updating rounding_driver. These are all news to me; thanks for the list. There are some relatively minor things involving removal of assumption that there are no padding bits (OK, so Emacs is not likely to run on Crays any time soon, but it's easy to port). My bigger concern is memory management, along with integer overflow in size or bitcount calculation. Copies are made of bignums when not needed, behavior is dicey if memory is exhausted during bignum computation, and I'm afraid C-g will have problems when bignums get large. I don't have a good handle on this stuff yet. I have put in some sanity checks (e.g., see check_bignum_size in emacs.c) but I suspect more are needed. In particular, Fexpt will need to be careful as it is a good way to explode a bignum's size.