From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: master 3843711 3/3: Simplify calculator-expt Date: Tue, 5 Nov 2019 13:45:16 -0800 Organization: UCLA Computer Science Department Message-ID: <17b29b23-6fc5-0e9e-973d-51f20c563bb8@cs.ucla.edu> References: <20191105073959.21509.71385@vcs0.savannah.gnu.org> <20191105074004.5063220A3C@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------78220FFC8A6C320E26A49413" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="52055"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 22:57:40 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iS6pX-000DPK-OH for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 22:57:39 +0100 Original-Received: from localhost ([::1]:50752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS6pT-0002gc-K0 for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 16:57:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48368) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS6dd-0008Pk-Vn for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:45:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS6dc-0002qt-J4 for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:45:21 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iS6dc-0002oR-Av for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:45:20 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 51C371605F9; Tue, 5 Nov 2019 13:45:18 -0800 (PST) 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 bU8qrT-pzFJc; Tue, 5 Nov 2019 13:45:17 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4CCBA160514; Tue, 5 Nov 2019 13:45:17 -0800 (PST) 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 CP5oKO1UXNSw; Tue, 5 Nov 2019 13:45:17 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2E7B3160511; Tue, 5 Nov 2019 13:45:17 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241822 Archived-At: This is a multi-part message in MIME format. --------------78220FFC8A6C320E26A49413 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/5/19 3:28 AM, Juanma Barranquero wrote: > calculator.el:1644:1:Warning: the function `cl-evenp' might not be > defined at runtime. Thanks, I installed the attached to pacify the byte-compiler about that. (Remind me again why cl-lib is not preloaded? :-) --------------78220FFC8A6C320E26A49413 Content-Type: text/x-patch; charset=UTF-8; name="0001-Pacify-byte-compiler-in-calculator.el.patch" Content-Disposition: attachment; filename="0001-Pacify-byte-compiler-in-calculator.el.patch" Content-Transfer-Encoding: quoted-printable >From f28d1b1f9491c95319b7073d29bb67c0f5431145 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Nov 2019 13:43:44 -0800 Subject: [PATCH] Pacify byte-compiler in calculator.el MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * lisp/calculator.el (calculator-expt): Open-code cl-evenp to pacify warning =E2=80=9Cthe function =E2=80=98cl-evenp=E2=80=99 might not= be defined=E2=80=9D. Problem reported by Juanma Barranquero in: https://lists.gnu.org/r/emacs-devel/2019-11/msg00118.html --- lisp/calculator.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index fab365d5f2..6c07ee2225 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1620,7 +1620,9 @@ calculator-expt (condition-case nil (expt x y) (overflow-error - (if (or (natnump x) (cl-evenp y)) + ;; X and Y must be integers, as expt silently returns floating-poin= t + ;; infinity on floating-point overflow. + (if (or (natnump x) (zerop (logand x 1))) 1.0e+INF -1.0e+INF)))) =20 --=20 2.23.0 --------------78220FFC8A6C320E26A49413--