_gr_poly_tan_series_basecase, gr_poly_tan_series_basecase, _gr_poly_tan_series_newton, gr_poly_tan_series_newton, _gr_poly_tan_series_sine_cosine, gr_poly_tan_series_sine_cosine, _gr_poly_tan_series_exponential, gr_poly_tan_series_exponential
#include <flint/gr_poly.h>int _gr_poly_tan_series_basecase(gr_ptr f, gr_srcptr h, slong hlen, slong n, int func, gr_ctx_t ctx)sourceint gr_poly_tan_series_basecase(gr_poly_t f, const gr_poly_t h, slong n, int func, gr_ctx_t ctx)sourceint _gr_poly_tan_series_newton(gr_ptr f, gr_srcptr h, slong hlen, slong n, slong cutoff, int func, gr_ctx_t ctx)sourceint gr_poly_tan_series_newton(gr_poly_t f, const gr_poly_t h, slong n, slong cutoff, int func, gr_ctx_t ctx)sourceint _gr_poly_tan_series_sine_cosine(gr_ptr f, gr_srcptr h, slong hlen, slong n, int func, gr_ctx_t ctx)sourceint gr_poly_tan_series_sine_cosine(gr_poly_t res, const gr_poly_t h, slong len, int func, gr_ctx_t ctx)sourceint _gr_poly_tan_series_exponential(gr_ptr f, gr_srcptr h, slong hlen, slong n, int func, gr_ctx_t ctx)sourceint gr_poly_tan_series_exponential(gr_poly_t res, const gr_poly_t h, slong len, int func, gr_ctx_t ctx)sourceCompute a tangent-like function of a power series with a specific algorithm. The parameter func selects the function: 0 for \tan, 1 for \tanh, 2 for \cot, 3 for \coth, 4 for \tan(\pi \cdot), 6 for \cot(\pi \cdot) (5 and 7, the hyperbolic functions times \pi, are not implemented).
The basecase algorithm uses an O(n^2) recurrence for the coefficients (from f' = h'(1 \pm f^2)). The newton algorithm inverts the integral defining the inverse function by Newton iteration, with the basecase below cutoff. The sine_cosine algorithm divides a sine by a cosine; for the hyperbolic functions it needs the imaginary unit in the ring. The exponential algorithm writes the function as a quotient of \pm 1 plus an exponential, choosing the sign of the exponent (if possible) so that the exponential is small; for the trigonometric functions it needs the imaginary unit.
The FLINT team, “_gr_poly_tan_series_basecase, gr_poly_tan_series_basecase, _gr_poly_tan_series_newton, gr_poly_tan_series_newton, _gr_poly_tan_series_sine_cosine, gr_poly_tan_series_sine_cosine, _gr_poly_tan_series_exponential, gr_poly_tan_series_exponential (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_tan_series_basecase.html (generated 2026-10-20).
@misc{flint-doc-gr-poly-gr-poly-tan-series-basecase,
author = {{The FLINT team}},
title = {{\_gr\_poly\_tan\_series\_basecase, gr\_poly\_tan\_series\_basecase, \_gr\_poly\_tan\_series\_newton, gr\_poly\_tan\_series\_newton, \_gr\_poly\_tan\_series\_sine\_cosine, gr\_poly\_tan\_series\_sine\_cosine, \_gr\_poly\_tan\_series\_exponential, gr\_poly\_tan\_series\_exponential (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/_gr_poly_tan_series_basecase.html},
note = {Generated 2026-10-20}
}