Function: math-bernoulli-coefs
math-bernoulli-coefs is a byte-compiled function defined in
calc-funcs.el.gz.
Signature
(math-bernoulli-coefs N)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-funcs.el.gz
(defun math-bernoulli-coefs (n)
(let* ((coefs (list (calcFunc-bern n)))
(nn (math-trunc n))
(k nn)
(term nn)
coef
(calc-prefer-frac (or (integerp n) calc-prefer-frac)))
(while (>= (setq k (1- k)) 0)
(setq term (math-div term (- nn k))
coef (math-mul term (math-bernoulli-number k))
coefs (cons (if (consp n) (math-float coef) coef) coefs)
term (math-mul term k)))
(nreverse coefs)))