_mp_real_exp_notab, _mp_real_exp_notab_r, _mp_real_sin_cos_notab, _mp_real_sin_cos_notab_r
#include <flint/mp_real.h>void _mp_real_sin_cos_notab_r(nn_ptr ysin, nn_ptr ycos, ulong * err, nn_srcptr x, slong n, int r)sourceEvaluate \exp(x), respectively \sin x and \cos x, for any (x, n) in [0, 1) without precomputed tables: the argument is halved down to the depth r, the reduced function evaluated by _mp_real_exp_reduced resp. _mp_real_sin_cos_reduced, and the result squared resp. the angle doubled back. Outputs have n + 1 limbs; err is at most 128. The _r versions take the depth r explicitly, for tuning.
With z the leading zero bits of x, the argument is halved h = \max(0, r - z) times. The exponential is squared h times (one sqrhigh each, all values in [1, e)); relative errors double per squaring, which h + \log_2 n + 8 guard bits absorb. The angle is doubled on g = 1 - \cos alone, g(2\theta) = 2g(2 - g), and the sine recovered at the end as \sqrt{2g - g^2}; 2h + z + \log_2 n + 8 guard bits absorb the amplification. The tuned depth is 16 or 32 for the exponential and 24 or 32 for the sine and cosine.
Guides#
The FLINT team, “_mp_real_exp_notab, _mp_real_exp_notab_r, _mp_real_sin_cos_notab, _mp_real_sin_cos_notab_r (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_notab.html (generated 2026-10-20).
@misc{flint-doc-mp-real-mp-real-exp-notab,
author = {{The FLINT team}},
title = {{\_mp\_real\_exp\_notab, \_mp\_real\_exp\_notab\_r, \_mp\_real\_sin\_cos\_notab, \_mp\_real\_sin\_cos\_notab\_r (mp\_real.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mp_real/_mp_real_exp_notab.html},
note = {Generated 2026-10-20}
}