* 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
(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))))