nfloat_exp10, nfloat_log10, nfloat_cot, nfloat_sec, nfloat_csc, nfloat_sinc, nfloat_cot_pi, nfloat_sec_pi, nfloat_csc_pi, nfloat_sinc_pi, nfloat_coth, nfloat_sech, nfloat_csch, nfloat_asin, nfloat_acos, nfloat_asin_pi, nfloat_acos_pi, nfloat_atan_pi, nfloat_acot, nfloat_asec, nfloat_acsc, nfloat_acot_pi, nfloat_asec_pi, nfloat_acsc_pi, nfloat_asinh, nfloat_acosh, nfloat_atanh, nfloat_acoth, nfloat_asech, nfloat_acsch
#include <flint/nfloat.h>int nfloat_exp10(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_log10(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_cot(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_sec(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_csc(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_sinc(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_cot_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_sec_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_csc_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_sinc_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_coth(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_sech(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_csch(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asin(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acos(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asin_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acos_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_atan_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acot(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asec(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acsc(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acot_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asec_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acsc_pi(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asinh(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acosh(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_atanh(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acoth(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_asech(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_acsch(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceThe less common elementary functions. After the exact special values (zeros, poles, |x| = 1 for the inverse functions, multiples of 1/2 for the functions of \pi x), they are evaluated as short compositions of the functions above in an internal context with a guard word (none when the function precision is sufficiently below the precision), using formulas without cancellation, such as \operatorname{asin}(x) = \operatorname{atan2}(x, \sqrt{(1 - x)(1 + x)}) and \operatorname{asinh}(x) = \operatorname{log1p}(|x| + x^2/(1 + \sqrt{1 + x^2})), and a rigorous bound for the composed error, which is added to obtain valid bounds with directed rounding.
On 64-bit machines, at one and two words, the reciprocal functions (sec, csc, sech, csch, also of \pi x) and sinc (also of \pi x) instead divide the fixed-point outputs of the in-register fast paths of the sine, the cosine and the paired exponentials, and the inverse functions are evaluated in fixed point at one more word: y^2 \pm 1 exactly, square roots by a refined reciprocal square root (as for nfloat_sqrt at two words), the arctangent of a ratio (asin, acos, asec, acsc, acot and the functions divided by \pi, which multiply by 2/\pi) or the logarithm kernels (the inverse hyperbolic functions, as sums of logarithms of the same sign, for example \operatorname{atanh}(y) = (\operatorname{log1p}(y) - \log(1 - y))/2). Arguments where an intermediate result would lose relative accuracy at that precision (results below about 2^{-32} or 2^{-40} from small differences, |x| \ge 2^{62}) take the general path.
The FLINT team, “nfloat_exp10, nfloat_log10, nfloat_cot, nfloat_sec, nfloat_csc, nfloat_sinc, nfloat_cot_pi, nfloat_sec_pi, nfloat_csc_pi, nfloat_sinc_pi, nfloat_coth, nfloat_sech, nfloat_csch, nfloat_asin, nfloat_acos, nfloat_asin_pi, nfloat_acos_pi, nfloat_atan_pi, nfloat_acot, nfloat_asec, nfloat_acsc, nfloat_acot_pi, nfloat_asec_pi, nfloat_acsc_pi, nfloat_asinh, nfloat_acosh, nfloat_atanh, nfloat_acoth, nfloat_asech, nfloat_acsch (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_exp10.html (generated 2026-10-20).
@misc{flint-doc-nfloat-nfloat-exp10,
author = {{The FLINT team}},
title = {{nfloat\_exp10, nfloat\_log10, nfloat\_cot, nfloat\_sec, nfloat\_csc, nfloat\_sinc, nfloat\_cot\_pi, nfloat\_sec\_pi, nfloat\_csc\_pi, nfloat\_sinc\_pi, nfloat\_coth, nfloat\_sech, nfloat\_csch, nfloat\_asin, nfloat\_acos, nfloat\_asin\_pi, nfloat\_acos\_pi, nfloat\_atan\_pi, nfloat\_acot, nfloat\_asec, nfloat\_acsc, nfloat\_acot\_pi, nfloat\_asec\_pi, nfloat\_acsc\_pi, nfloat\_asinh, nfloat\_acosh, nfloat\_atanh, nfloat\_acoth, nfloat\_asech, nfloat\_acsch (nfloat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nfloat/nfloat_exp10.html},
note = {Generated 2026-10-20}
}