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
This commit is contained in:
parent
9e832ba91b
commit
3876a60569
1 changed files with 1 additions and 1 deletions
|
@ -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))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue