Function: bernpol
Section: combinatorics
C-Name: bernpol_eval
Prototype: LDG
Help: bernpol(n,{a='x}): Bernoulli polynomial B_n, evaluated at a
Doc: \idx{Bernoulli polynomial} $B_{n}$ evaluated at $a$ (\kbd{'x} by default),
 defined by
 $$
  \sum_{n=0}^{\infty}B_{n}(x)\dfrac{T^{n}}{n!} = \dfrac{Te^{xT}}{e^{T}-1}.
 $$
 \bprog
 ? bernpol(1)
 %1 = x - 1/2
 ? bernpol(3)
 %2 = x^3 - 3/2*x^2 + 1/2*x
 ? bernpol(3, 2)
 %3 = 3
 @eprog\noindent Note that evaluation at $a$ is only provided for convenience
 and uniformity of interface: contrary to, e.g., \kbd{polcyclo}, computing
 the evaluation is no faster than
 \bprog
 B = bernpol(k); subst(B, 'x, a)
 @eprog\noindent and the latter allows to reuse $B$ to evaluate $B_{k}$
 at different values.
Variant: The variant \fun{GEN}{bernpol}{long k, long v} returns
 the $k$-the Bernoulli polynomial in variable $v$.

