From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bignum speedup patch causes crash at startup Date: Wed, 05 Sep 2018 05:35:41 +0300 Message-ID: <83sh2oy8le.fsf@gnu.org> References: <838t4hz4bd.fsf@gnu.org> <831sa9z0wa.fsf@gnu.org> <54c97913-984d-6129-e126-3c7fb66ed6c6@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1536114832 11522 195.159.176.226 (5 Sep 2018 02:33:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2018 02:33:52 +0000 (UTC) Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 05 04:33:48 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 1fxNdc-0002tH-36 for ged-emacs-devel@m.gmane.org; Wed, 05 Sep 2018 04:33:48 +0200 Original-Received: from localhost ([::1]:53529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxNfi-0002Ez-7a for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2018 22:35:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxNfa-0002Eu-0f for emacs-devel@gnu.org; Tue, 04 Sep 2018 22:35:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxNfW-0000GI-Nu for emacs-devel@gnu.org; Tue, 04 Sep 2018 22:35:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxNfW-0000G8-GH; Tue, 04 Sep 2018 22:35:46 -0400 Original-Received: from [176.228.60.248] (port=1914 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fxNfW-0006IW-2R; Tue, 04 Sep 2018 22:35:46 -0400 In-reply-to: <54c97913-984d-6129-e126-3c7fb66ed6c6@cs.ucla.edu> (message from Paul Eggert on Tue, 4 Sep 2018 11:59:53 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:229276 Archived-At: > Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org > From: Paul Eggert > Date: Tue, 4 Sep 2018 11:59:53 -0700 > > First, converting a fixnum to a double can lose info. Whether that is a possibility could be established by a simple magnitude test. > Second, the double > division could round, which would mean the result would be double-rounded. We're > already suffering from double-rounding when either argument is floating-point, > and we don't want that bug to also infect integer division. I don't understand what bug you are alluding to. Can you elaborate? > So even the Emacs 26 code (which doesn't have bignums) must use > integer division here, not double division. Fine, but don't you agree that calling libgmp, when the second argument is 1 and the 1st is a fixnum, is a little bit ridiculous? Could we at least special-case that? Thanks.