]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix math-imaginary-i check
authorNoam Postavsky <npostavs@gmail.com>
Wed, 15 Aug 2018 03:26:50 +0000 (23:26 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Tue, 28 Aug 2018 12:04:17 +0000 (08:04 -0400)
Reported by Bastian Erdnüß at
<https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00300.html>.
* lisp/calc/calc-cplx.el (math-imaginary-i): Check for a value
of (polar 1 <quarter-circle>).

lisp/calc/calc-cplx.el

index 4a453a73d72744d9dcc0973d4b392192981a87aa..35cd31dfb4fd71032632bb28d2a5cc1ff7b04e95 100644 (file)
     (or (eq (car-safe val) 'special-const)
        (equal val '(cplx 0 1))
        (and (eq (car-safe val) 'polar)
-            (eq (nth 1 val) 0)
-            (Math-equal (nth 1 val) (math-quarter-circle nil))))))
+            (eq (nth 1 val) 1)
+            (Math-equal (nth 2 val) (math-quarter-circle nil))))))
 
 ;;; Extract the real or complex part of a complex number.  [R N] [Public]
 ;;; Also extracts the real part of a modulo form.