FLINT3.7.0-dev

_mp_real_exp_rs, _mp_real_sin_rs, _mp_real_cos_rs, _mp_real_sin_cos_rs, _mp_real_sinh_rs, _mp_real_cosh_rs, _mp_real_sinh_cosh_rs, _mp_real_atan_rs, _mp_real_atanh_rs

Synopsis#include <flint/mp_real.h>
void _mp_real_exp_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_sin_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_cos_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_sin_cos_rs(nn_ptr ysin, nn_ptr ycos, ulong * err, nn_srcptr x, slong n)source
void _mp_real_sinh_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_cosh_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_sinh_cosh_rs(nn_ptr ysinh, nn_ptr ycosh, ulong * err, nn_srcptr x, slong n)source
void _mp_real_atan_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source
void _mp_real_atanh_rs(nn_ptr res, ulong * err, nn_srcptr x, slong n)source

Evaluate the Taylor series of the function at (x, n) with x < 2^{-32} by rectangular splitting. The outputs have n + 1 limbs for exp, sin, cos, sinh and cosh and n limbs for atan and atanh; the combined versions allow either output to be NULL. err is at most 10 for exp and 15 for the others, and the bound is one-sided (the result never exceeds the true value) for exp, sinh, cosh and atanh.

The functions dispatch on the top limbs of x: straight-line generated code for 2^{-64} \le x < 2^{-32} and x < 2^{-64} at the sizes on the hot paths of the elementary functions (64-bit only), a generic engine with the same calls in the same order at the other sizes, and the tapered rectangular splitting _mp_real_series_rs beyond. The precondition x < 2^{-32} is checked only by FLINT_ASSERT.

Cite this page

The FLINT team, “_mp_real_exp_rs, _mp_real_sin_rs, _mp_real_cos_rs, _mp_real_sin_cos_rs, _mp_real_sinh_rs, _mp_real_cosh_rs, _mp_real_sinh_cosh_rs, _mp_real_atan_rs, _mp_real_atanh_rs (mp_real.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mp_real/_mp_real_exp_rs.html (generated 2026-10-20).