FLINT3.7.0-dev

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)source
int nfloat_expm1(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_exp2(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_log(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_log1p(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_log2(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source

Exponentials 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).