nfloat_exp, nfloat_expm1, nfloat_exp2, nfloat_log, nfloat_log1p, nfloat_log2
Synopsis
#include <flint/nfloat.h>int nfloat_exp(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_expm1(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_exp2(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_log(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_log1p(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceint nfloat_log2(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)sourceExponentials e^x, e^x - 1, 2^x and logarithms \log x, \log(1 + x), \log_2 x. The exponentials reduce |x| modulo \log 2 in fixed point (with one integral word); expm1 and log1p have relative accuracy near zero, and exp2 and log2 are exact for integers and powers of two respectively.
Guides#
Cite this page
The FLINT team, “nfloat_exp, nfloat_expm1, nfloat_exp2, nfloat_log, nfloat_log1p, nfloat_log2 (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_exp.html (generated 2026-10-20).
@misc{flint-doc-nfloat-nfloat-exp,
author = {{The FLINT team}},
title = {{nfloat\_exp, nfloat\_expm1, nfloat\_exp2, nfloat\_log, nfloat\_log1p, nfloat\_log2 (nfloat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nfloat/nfloat_exp.html},
note = {Generated 2026-10-20}
}