emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 3876a60: Fix a typo in calculator.el


From: Paul Eggert
Subject: emacs-27 3876a60: Fix a typo in calculator.el
Date: Thu, 16 Apr 2020 16:55:20 -0400 (EDT)

branch: emacs-27
commit 3876a605694b7f3053268e1760b3052f5ac451f4
Author: jakub-w <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
    Copyright-paperwork-exempt: yes
---
 lisp/calculator.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calculator.el b/lisp/calculator.el
index c1af26f..6996990 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -1622,7 +1622,7 @@ To use this, apply a binary operator (evaluate it), then 
call this."
     (overflow-error
      ;; 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)))
+     (if (or (natnump x) (zerop (logand y 1)))
         1.0e+INF
        -1.0e+INF))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]