deccfloat_exp, deccfloat_expm1, deccfloat_log, deccfloat_log1p, deccfloat_sin, deccfloat_cos, deccfloat_tan, deccfloat_sinh, deccfloat_cosh, deccfloat_tanh, deccfloat_asin, deccfloat_acos, deccfloat_atan, deccfloat_asinh, deccfloat_acosh, deccfloat_atanh, deccfloat_sin_cos, deccfloat_sinh_cosh, deccfloat_pi
#include <flint/decimal.h>int deccfloat_exp(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_expm1(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_log(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_log1p(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_sin(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_cos(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_tan(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_sinh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_cosh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_tanh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_asin(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_acos(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_atan(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_asinh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_acosh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_atanh(deccfloat_t res, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_sin_cos(deccfloat_t res1, deccfloat_t res2, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_sinh_cosh(deccfloat_t res1, deccfloat_t res2, const deccfloat_t x, gr_ctx_t ctx)sourceint deccfloat_pi(deccfloat_t res, gr_ctx_t ctx)sourceThe elementary functions of complex floating-point numbers, componentwise correctly rounded: the real and imaginary parts of the exact value are each rounded once, to the context precision in the respective rounding modes. The other special functions, including the complex-only ones (exp_pi_i, log_pi_i, polygamma, ...), are available through the generic gr methods.
Each function is evaluated by the first applicable of three methods.
- Real and imaginary arguments. For a real argument the real
decfloatfunction is called, inheriting its exact cases and special-argument handling; if the value is not real, the standard reductions are applied: , and for and , for and for , , and . For an imaginary argument the corresponding real function is used where one exists: , , , , , for , and so on, and . So , , and are correctly rounded at negligible cost. - Tiny arguments. For , , , near 1, the trigonometric and hyperbolic functions and their inverses, , , , , near 1, , , , and (through ) the inverse cotangent, cosecant and their hyperbolic versions at large arguments, the leading part (, , , or ) is computed exactly and the sign of each component of from the first Taylor terms; a component whose remainder lies more than
precdigits below is rounded with the remainder as a sticky bit. This works for arbitrarily unbalanced arguments: rounded toward zero has both parts one ulp below and . - Ziv's strategy through
acb. The argument is converted to anacbball and thegrmethod of theacbring is evaluated at increasing precision until the rounding of each remaining component is decided;GR_UNABLEis returned if this has not happened at 64 times the working precision.
The last method is the only one for the other special functions. It fails when a component is a representable number or extremely close to one and the case is not detected, for example the real part of , which is , and for the functions without an acb method at non-real arguments (sec_pi, asin_pi, acos_pi, atan_pi, acot_pi, asec_pi, acsc_pi, erfinv, erfcinv).
The FLINT team, “deccfloat_exp, deccfloat_expm1, deccfloat_log, deccfloat_log1p, deccfloat_sin, deccfloat_cos, deccfloat_tan, deccfloat_sinh, deccfloat_cosh, deccfloat_tanh, deccfloat_asin, deccfloat_acos, deccfloat_atan, deccfloat_asinh, deccfloat_acosh, deccfloat_atanh, deccfloat_sin_cos, deccfloat_sinh_cosh, deccfloat_pi (decimal.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/decimal/deccfloat_exp.html (generated 2026-11-02).
@misc{flint-doc-decimal-deccfloat-exp,
author = {{The FLINT team}},
title = {{deccfloat\_exp, deccfloat\_expm1, deccfloat\_log, deccfloat\_log1p, deccfloat\_sin, deccfloat\_cos, deccfloat\_tan, deccfloat\_sinh, deccfloat\_cosh, deccfloat\_tanh, deccfloat\_asin, deccfloat\_acos, deccfloat\_atan, deccfloat\_asinh, deccfloat\_acosh, deccfloat\_atanh, deccfloat\_sin\_cos, deccfloat\_sinh\_cosh, deccfloat\_pi (decimal.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/decimal/deccfloat_exp.html},
note = {Generated 2026-11-02}
}