Function: math-complex
math-complex is an autoloaded and byte-compiled function defined in
calc-cplx.el.gz.
Signature
(math-complex A)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-cplx.el.gz
;;; Coerce A to be complex (rectangular form). [c N]
(defun math-complex (a)
(cond ((eq (car-safe a) 'cplx) a)
((eq (car-safe a) 'polar)
(if (math-zerop (nth 1 a))
(nth 1 a)
(let ((sc (calcFunc-sincos (nth 2 a))))
(list 'cplx
(math-mul (nth 1 a) (nth 1 sc))
(math-mul (nth 1 a) (nth 2 sc))))))
(t (list 'cplx a 0))))