Function: calcFunc-ln
calcFunc-ln is an autoloaded and byte-compiled function defined in
calc-math.el.gz.
Signature
(calcFunc-ln X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
;;; Logarithms.
(defun calcFunc-ln (x) ; [N N] [Public]
(cond ((math-zerop x)
(if calc-infinite-mode
'(neg (var inf var-inf))
(math-reject-arg x "*Logarithm of zero")))
((eq x 1) 0)
((Math-numberp x)
(math-with-extra-prec 2 (math-ln-raw (math-float x))))
((eq (car-safe x) 'sdev)
(math-make-sdev (calcFunc-ln (nth 1 x))
(math-div (nth 2 x) (nth 1 x))))
((and (eq (car-safe x) 'intv) (or (Math-posp (nth 2 x))
(Math-zerop (nth 2 x))
(not (math-intv-constp x))))
(let ((calc-infinite-mode t))
(math-make-intv (nth 1 x) (calcFunc-ln (nth 2 x))
(calcFunc-ln (nth 3 x)))))
((equal x '(var e var-e))
1)
((and (eq (car-safe x) '^)
(equal (nth 1 x) '(var e var-e))
(math-known-realp (nth 2 x)))
(nth 2 x))
((math-infinitep x)
(if (equal x '(var nan var-nan))
x
'(var inf var-inf)))
(t (calc-record-why 'numberp x)
(list 'calcFunc-ln x))))