FLINT3.7.0-dev

_mp_real_series_rs, _mp_real_series_rs_sin_cos

Synopsis#include <flint/mp_real.h>
void _mp_real_series_rs(nn_ptr res, nn_srcptr x, slong n, flint_bitcnt_t r, int func)source
void _mp_real_series_rs_sin_cos(nn_ptr ysin, nn_ptr yg, nn_srcptr x, slong n, flint_bitcnt_t r, int hyperbolic)source

Tapered rectangular splitting for a fraction 0≤x<2−r0 \le x < 2^{-r}, r≥8r \ge 8, of nn limbs. The first function computes exp⁡(±x)\exp(\pm x) (n+1n + 1 limbs, within 5 ulps) or sin⁡x\sin x, sinh⁡x\sinh x, atan⁡x\operatorname{atan} x, atanh⁡x\operatorname{atanh} x, 1−cos⁡x1 - \cos x, cosh⁡x−1\cosh x - 1 (nn limbs, within 2 ulps) as selected by func. The second computes the sine and 1−cos⁡1 - \cos (or sinh⁡\sinh and cosh⁡−1\cosh - 1 when hyperbolic is set) sharing the powers; either output may be NULL. Outputs may alias xx.

With v=xv = x (exp) or v=x2v = x^2, the series ∑k<Nakvk\sum_{k<N} a_k v^k is split into blocks of m≈N/1.5m \approx \sqrt{N/1.5} terms, the powers v,…,vmv, \ldots, v^m computed once and every term a single mpn_addmul_1 or mpn_submul_1 by a one-limb coefficient. Block bb enters the sum multiplied by vmb<2−smbv^{mb} < 2^{-smb} (s=rs = r resp. 2r2r), so it runs in a window shortened by smbsmb bits. See Series and rectangular splitting.

Guides#

Cite this page

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