FLINT3.7.0-dev

gr_bernpoly_ui, gr_eulerpoly_ui

Synopsis#include <flint/gr_special.h>
int gr_bernpoly_ui(gr_ptr res, ulong n, gr_srcptr x, gr_ctx_t ctx)source
int gr_eulerpoly_ui(gr_ptr res, ulong n, gr_srcptr x, gr_ctx_t ctx)source

Set res to the Bernoulli polynomial B_n(x) or the Euler polynomial E_n(x). These methods are implemented for real and complex balls (arb_bernoulli_poly_ui, acb_bernoulli_poly_ui); other rings return GR_UNABLE.

The ball versions compute E_n(x) = 2 (B_{n+1}(x) - 2^{n+1} B_{n+1}(x/2)) / (n+1), with extra working precision to absorb the cancellation between the two terms for large |x|.

Cite this page

The FLINT team, “gr_bernpoly_ui, gr_eulerpoly_ui (gr_special.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_special/gr_bernpoly_ui.html (generated 2026-10-20).