_mp_real_neglog_newton, _mp_real_neglog_newton_tune, _mp_real_atan_newton, _mp_real_atan_newton_tune
#include <flint/mp_real.h>void _mp_real_neglog_newton_tune(nn_ptr y, ulong * err, nn_srcptr x, slong n, int forward, slong N)sourcevoid _mp_real_atan_newton_tune(nn_ptr y, ulong * err, nn_srcptr x, slong n, int forward, slong N)sourceSet (y, n) to -\log x for (x, n) in [1/2, 1), respectively to \operatorname{atan} x for (x, n) in [0, 1), by one Newton–Taylor step over the forward function: -\log x = t - \log(1 + w) with w = x e^t - 1, resp. \operatorname{atan} x = t + \operatorname{atan} w with w = (x\cos t - \sin t)/(x \sin t + \cos t), from a starting value t correct to a fraction of the precision. err is computed at run time and at most 2.
The forward functions are the diophantine exponential and sine and cosine at n + 1 limbs. The _tune versions take the forward algorithm (0 diophantine, 1 bitwise, 2 table-free) and the number N of terms of the series in w (up to 16, 0 for the default); the starting value is computed at about 1/(N + 1) resp. 1/(2N) of the precision, by the bitwise kernels up to 512 limbs and recursively above. The whole costs one forward evaluation plus about a tenth of one. These are the kernels of mp_real_log_bits and mp_real_atan_bits above 600 limbs.
The FLINT team, “_mp_real_neglog_newton, _mp_real_neglog_newton_tune, _mp_real_atan_newton, _mp_real_atan_newton_tune (mp_real.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mp_real/_mp_real_neglog_newton.html (generated 2026-10-20).
@misc{flint-doc-mp-real-mp-real-neglog-newton,
author = {{The FLINT team}},
title = {{\_mp\_real\_neglog\_newton, \_mp\_real\_neglog\_newton\_tune, \_mp\_real\_atan\_newton, \_mp\_real\_atan\_newton\_tune (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_neglog_newton.html},
note = {Generated 2026-10-20}
}