Function: calcFunc-arctanh
calcFunc-arctanh is an autoloaded and byte-compiled function defined
in calc-math.el.gz.
Signature
(calcFunc-arctanh X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
(defun calcFunc-arctanh (x) ; [N N] [Public]
(cond ((eq x 0) 0)
((and (Math-equal-int x 1) calc-infinite-mode)
'(var inf var-inf))
((and (Math-equal-int x -1) calc-infinite-mode)
'(neg (var inf var-inf)))
(math-expand-formulas
(list '/ (list '-
(list 'calcFunc-ln (list '+ 1 x))
(list 'calcFunc-ln (list '- 1 x))) 2))
((Math-numberp x)
(if calc-symbolic-mode (signal 'inexact-result nil))
(math-with-extra-prec 2
(if (or (memq (car-safe x) '(cplx polar))
(Math-lessp 1 x))
(math-mul (math-sub (math-ln-raw (math-add '(float 1 0) x))
(math-ln-raw (math-sub '(float 1 0) x)))
'(float 5 -1))
(if (and (math-equal-int x 1) calc-infinite-mode)
'(var inf var-inf)
(if (and (math-equal-int x -1) calc-infinite-mode)
'(neg (var inf var-inf))
(math-mul (math-ln-raw (math-div (math-add '(float 1 0) x)
(math-sub 1 x)))
'(float 5 -1)))))))
((eq (car-safe x) 'sdev)
(math-make-sdev (calcFunc-arctanh (nth 1 x))
(math-div (nth 2 x)
(math-sub 1 (math-sqr (nth 1 x))))))
((eq (car x) 'intv)
(math-sort-intv (nth 1 x)
(calcFunc-arctanh (nth 2 x))
(calcFunc-arctanh (nth 3 x))))
((equal x '(var nan var-nan))
x)
(t (calc-record-why 'numberp x)
(list 'calcFunc-arctanh x))))