From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "" Newsgroups: gmane.emacs.devel Subject: Re: master 3843711 3/3: Simplify calculator-expt Date: Thu, 16 Apr 2020 22:36:54 +0200 Message-ID: <871ronupzt.fsf@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="43304"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 16 23:27:36 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPC2o-000B8f-Ql for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Apr 2020 23:27:34 +0200 Original-Received: from localhost ([::1]:39496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPC2n-0006Ej-T1 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Apr 2020 17:27:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60621) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPBFz-0000I1-UW for emacs-devel@gnu.org; Thu, 16 Apr 2020 16:37:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPBFy-0004K1-K9 for emacs-devel@gnu.org; Thu, 16 Apr 2020 16:37:07 -0400 Original-Received: from mx1.riseup.net ([198.252.153.129]:33664) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jPBFy-0004Ha-9L for emacs-devel@gnu.org; Thu, 16 Apr 2020 16:37:06 -0400 Original-Received: from capuchin.riseup.net (unknown [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4939xr33qzzFcwX; Thu, 16 Apr 2020 13:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1587069424; bh=s23DXI9RUvFYlg4dr+31K8w8VfBEKNR7KW0MpWAPqNc=; h=From:To:Subject:CC:Date:From; b=UOo8mrNo0m7C1bFTdeP2K+XLmTI8IPPwgWd2OAiY7skWznZNXTntuofVyT8pjpB3F 2qOUbU+t9DE7cRkR1fueWg/2xiGXkIwucpPOcxz16EqXxCuTz7fZcJZUgq9YDYEcxS 36lLDdyToC54Tcg+EcZ4k6leX0buS5QK8jp0IC+M= X-Riseup-User-ID: E2EA2306905CC0F6F34743DE0720C37BF0F0236AB3E20FAEAC8BCF472AD75FB6 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4939xq0T7Dz8tsG; Thu, 16 Apr 2020 13:37:02 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.252.153.129 X-Mailman-Approved-At: Thu, 16 Apr 2020 17:27:01 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247136 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Good thing I decided to read the mailing list 5 months after the patch was submitted. There was a typo that would be pretty hard to catch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-a-typo-in-calculator.el.patch Content-Transfer-Encoding: quoted-printable From=209acd26cf70decf20240f5485d6f12f4cf22c2a80 Mon Sep 17 00:00:00 2001 From: jakub-w Date: Thu, 16 Apr 2020 22:07:14 +0200 Subject: [PATCH] Fix a typo in calculator.el * lisp/calculator.el (calculator-expt): Overflowing exponentiation caused the function to return -1.0e+INF if the base was an odd, negative number, no matter what the exponent was. =2D-- lisp/calculator.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index c1af26ffcc..6996990814 100644 =2D-- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1622,7 +1622,7 @@ calculator-expt (overflow-error ;; X and Y must be integers, as expt silently returns floating-point ;; infinity on floating-point overflow. =2D (if (or (natnump x) (zerop (logand x 1))) + (if (or (natnump x) (zerop (logand y 1))) 1.0e+INF -1.0e+INF)))) =20 =2D-=20 2.26.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEjyJ5FFWW4Y1mdT0FcTDfCUiwZWUFAl6YweYACgkQcTDfCUiw ZWWlvQf/W+2JoPpvhhWLFSzdOV6qztCC0nBOXgbLNTbMSxZFAaX17+pvhDzizc91 AiJcsmr/Ub66IHlzXBatNERMMe3NOP6Y7uNdSLgD4Hz3Tkazc4d6+dH1wFA1KFIx WDWKsw+8QE2rgKCvBCTnK1OP2OohDEGRbGvAAUbdp2mMxuqNi6Jmcvak5P8ClRqH ansrMz3B+GfigPZYVhySnS1PDt8Dj2CMOSJrEb4su29NdY7H/sBsVtnp23JxJaD2 JMLxjlx3+ejzkMOljZK4UDJx0SKumIoKaJpR5yITPhQ5muQIXsVZpnZtSfJHii/S qAeqbKdVLiaa6WSd5rJrPdFeiazIEA== =BZa4 -----END PGP SIGNATURE----- --==-=-=--