FLINT3.7.0-dev

_arb_sin_cos_taylor_naive, _arb_sin_cos_taylor_rs

Synopsis#include <flint/arb.h>
void _arb_sin_cos_taylor_naive(nn_ptr ysin, nn_ptr ycos, ulong * error, nn_srcptr x, slong xn, ulong N)source
void _arb_sin_cos_taylor_rs(nn_ptr ysin, nn_ptr ycos, ulong * error, nn_srcptr x, slong xn, ulong N, int sinonly, int alternating)source

Set ysin and ycos to approximations of ∑k=0N−1(−1)kx2k+1/(2k+1)!\sum_{k=0}^{N-1} (-1)^k x^{2k+1}/(2k+1)! and ∑k=0N−1(−1)kx2k/(2k)!\sum_{k=0}^{N-1} (-1)^k x^{2k}/(2k)!, with xn fractional limbs, and write an error bound in ulps to error. Require N≤143N \le 143, 0≤x≤1/160 \le x \le 1/16 and xn>0\mathit{xn} > 0.

In the rs version, sinonly = 1 computes only the sine, and alternating = 0 computes the series without signs (the hyperbolic sine, intended for use with sinonly, as in the exponential at high precision, where cosh⁡\cosh is then obtained from 1+sinh⁡2\sqrt{1 + \sinh^2}).

Cite this page

The FLINT team, “_arb_sin_cos_taylor_naive, _arb_sin_cos_taylor_rs (arb.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb/_arb_sin_cos_taylor_naive.html (generated 2026-11-02).