Function: calcFunc-expm1
calcFunc-expm1 is an autoloaded and byte-compiled function defined in
calc-math.el.gz.
Signature
(calcFunc-expm1 X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
(defun calcFunc-expm1 (x) ; [N N] [Public]
(cond ((eq x 0) 0)
((math-zerop x) '(float 0 0))
(calc-symbolic-mode (signal 'inexact-result nil))
((Math-numberp x)
(math-with-extra-prec 2
(let ((x (math-float x)))
(if (and (eq (car x) 'float)
(math-lessp-float x '(float 1 0))
(math-lessp-float '(float -1 0) x))
(math-exp-minus-1-raw x)
(math-add (math-exp-raw x) -1)))))
((eq (car-safe x) 'sdev)
(if (math-constp x)
(let ((ex (calcFunc-expm1 (nth 1 x))))
(math-make-sdev ex (math-mul (nth 2 x) (math-add ex 1))))
(math-make-sdev (calcFunc-expm1 (nth 1 x))
(math-mul (nth 2 x) (calcFunc-exp (nth 1 x))))))
((eq (car-safe x) 'intv)
(math-make-intv (nth 1 x)
(calcFunc-expm1 (nth 2 x))
(calcFunc-expm1 (nth 3 x))))
((equal x '(var inf var-inf))
x)
((equal x '(neg (var inf var-inf)))
-1)
((equal x '(var nan var-nan))
x)
(t (calc-record-why 'numberp x)
(list 'calcFunc-expm1 x))))