Function: math-gammap1-raw
math-gammap1-raw is an autoloaded and byte-compiled function defined
in calc-funcs.el.gz.
Signature
(math-gammap1-raw X &optional FPREC NFPREC)
Documentation
Compute gamma(1+X) to the appropriate precision.
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-funcs.el.gz
(defun math-gammap1-raw (x &optional fprec nfprec)
"Compute gamma(1+X) to the appropriate precision."
(or fprec
(setq fprec (math-float calc-internal-prec)
nfprec (math-float (- calc-internal-prec))))
(cond ((math-lessp-float (calcFunc-re x) fprec)
(if (math-lessp-float (calcFunc-re x) nfprec)
(math-neg (math-div
(math-pi)
(math-mul (math-gammap1-raw
(math-add (math-neg x)
'(float -1 0))
fprec nfprec)
(math-sin-raw
(math-mul (math-pi) x)))))
(let ((xplus1 (math-add x '(float 1 0))))
(math-div (math-gammap1-raw xplus1 fprec nfprec) xplus1))))
((and (math-realp x)
(math-lessp-float '(float 736276 0) x))
(math-overflow))
(t ; re(x) now >= 10.0
(let ((xinv (math-div 1 x))
(lnx (math-ln-raw x)))
(math-mul (math-sqrt-two-pi)
(math-exp-raw
(math-gamma-series
(math-sub (math-mul (math-add x '(float 5 -1))
lnx)
x)
xinv
(math-sqr xinv)
'(float 0 0)
2)))))))