Function: calcFunc-bern

calcFunc-bern is an autoloaded and byte-compiled function defined in calc-funcs.el.gz.

Signature

(calcFunc-bern N &optional X)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-funcs.el.gz
;;;; Bernoulli and Euler polynomials and numbers.

(defun calcFunc-bern (n &optional x)
  (if (and x (not (math-zerop x)))
      (if (and calc-symbolic-mode (math-floatp x))
	  (math-inexact-result)
	(math-build-polynomial-expr (math-bernoulli-coefs n) x))
    (or (math-num-natnump n) (math-reject-arg n 'natnump))
    (if (consp n)
	(progn
	  (math-inexact-result)
	  (math-float (math-bernoulli-number (math-trunc n))))
      (math-bernoulli-number n))))