From: Paul Eggert Date: Tue, 5 Nov 2019 21:43:44 +0000 (-0800) Subject: Pacify byte-compiler in calculator.el X-Git-Tag: emacs-27.0.90~733 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5f10c6755f3e1670e4dc59842be72cdf62d3f91;p=emacs.git Pacify byte-compiler in calculator.el * lisp/calculator.el (calculator-expt): Open-code cl-evenp to pacify warning “the function ‘cl-evenp’ might not be defined”. Problem reported by Juanma Barranquero in: https://lists.gnu.org/r/emacs-devel/2019-11/msg00118.html --- diff --git a/lisp/calculator.el b/lisp/calculator.el index fab365d5f28..6c07ee2225d 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1620,7 +1620,9 @@ To use this, apply a binary operator (evaluate it), then call this." (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-point + ;; infinity on floating-point overflow. + (if (or (natnump x) (zerop (logand x 1))) 1.0e+INF -1.0e+INF))))