FLINT3.7.0-dev

gr_generic_chebyshev_t2_fmpz, gr_generic_chebyshev_t_fmpz, gr_generic_chebyshev_u2_fmpz, gr_generic_chebyshev_u_fmpz

Synopsis#include <flint/gr_special.h>
int gr_generic_chebyshev_t2_fmpz(gr_ptr a, gr_ptr b, const fmpz_t n, gr_srcptr x, gr_ctx_t ctx)source
int gr_generic_chebyshev_t_fmpz(gr_ptr y, const fmpz_t n, gr_srcptr x, gr_ctx_t ctx)source
int gr_generic_chebyshev_u2_fmpz(gr_ptr a, gr_ptr b, const fmpz_t n, gr_srcptr x, gr_ctx_t ctx)source
int gr_generic_chebyshev_u_fmpz(gr_ptr y, const fmpz_t n, gr_srcptr x, gr_ctx_t ctx)source

Chebyshev polynomials Tn(x)T_n(x) and Un(x)U_n(x) for n≥0n \ge 0 by the doubling formulas T2k=2Tk2−1T_{2k} = 2T_k^2 - 1 and T2k+1=2TkTk+1−xT_{2k+1} = 2 T_k T_{k+1} - x (and analogues for UU) along the binary expansion of nn, using O(log⁡n)O(\log n) multiplications. The 2 versions set a to Tn(x)T_n(x) and b to Tn−1(x)T_{n-1}(x) (respectively UU). Negative nn gives GR_UNABLE.

Cite this page

The FLINT team, “gr_generic_chebyshev_t2_fmpz, gr_generic_chebyshev_t_fmpz, gr_generic_chebyshev_u2_fmpz, gr_generic_chebyshev_u_fmpz (gr_special.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_special/gr_generic_chebyshev_t2_fmpz.html (generated 2026-11-02).