Function: calcFunc-coth

calcFunc-coth is an autoloaded and byte-compiled function defined in calc-math.el.gz.

Signature

(calcFunc-coth X)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
(defun calcFunc-coth (x)   ; [N N] [Public]
  (cond ((eq x 0) (math-div 1 0))
	(math-expand-formulas
	 (math-normalize
	  (let ((expx (list 'calcFunc-exp x))
		(expmx (list 'calcFunc-exp (list 'neg x))))
	    (math-normalize
	     (list '/ (list '+ expx expmx) (list '- expx expmx))))))
	((Math-numberp x)
	 (if calc-symbolic-mode (signal 'inexact-result nil))
	 (math-with-extra-prec 2
	   (let* ((expx (calcFunc-exp (math-float x)))
		  (expmx (math-div 1 expx)))
	     (math-div (math-add expx expmx)
		       (math-sub expx expmx)))))
	((eq (car-safe x) 'sdev)
	 (math-make-sdev (calcFunc-coth (nth 1 x))
			 (math-div (nth 2 x)
				   (math-sqr (calcFunc-sinh (nth 1 x))))))
	((eq (car x) 'intv)
         (if (and (Math-negp (nth 2 x))
                  (Math-posp (nth 3 x)))
             '(intv 3 (neg (var inf var-inf)) (var inf var-inf))
           (math-sort-intv (nth 1 x)
                           (calcFunc-coth (nth 2 x))
                           (calcFunc-coth (nth 3 x)))))
	((equal x '(var inf var-inf))
	 1)
	((equal x '(neg (var inf var-inf)))
	 -1)
	((equal x '(var nan var-nan))
	 x)
	(t (calc-record-why 'numberp x)
	   (list 'calcFunc-coth x))))