nfloat_complex_inv, nfloat_complex_div, nfloat_complex_sqrt, nfloat_complex_rsqrt
#include <flint/nfloat.h>int nfloat_complex_inv(nfloat_complex_ptr res, nfloat_complex_srcptr x, gr_ctx_t ctx)sourceint nfloat_complex_div(nfloat_complex_ptr res, nfloat_complex_srcptr x, nfloat_complex_srcptr y, gr_ctx_t ctx)sourceint nfloat_complex_sqrt(nfloat_complex_ptr res, nfloat_complex_srcptr x, gr_ctx_t ctx)sourceint nfloat_complex_rsqrt(nfloat_complex_ptr res, nfloat_complex_srcptr x, gr_ctx_t ctx)sourceInverse, quotient, square root and reciprocal square root (principal branches), with errors of a few ulps relative to the magnitude of the result. Purely real or imaginary operands are handled with the real functions.
The inverse and the quotient are and with a single reciprocal of shared by both parts (operands whose parts differ greatly in magnitude, or have extreme exponents, are rescaled first). At one word, is formed in registers and truncated to one word, and both parts of the numerator are divided by it with one shared inverse.
The square root of is computed from (by nfloat_hypot at one and two words and for extreme exponents, otherwise as ) as and , assigned to the real and imaginary parts according to the sign of , so that nothing cancels; the reciprocal square root uses and the products and . At one word on 64-bit machines, both are computed in registers.
The FLINT team, “nfloat_complex_inv, nfloat_complex_div, nfloat_complex_sqrt, nfloat_complex_rsqrt (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_complex_inv.html (generated 2026-11-02).
@misc{flint-doc-nfloat-nfloat-complex-inv,
author = {{The FLINT team}},
title = {{nfloat\_complex\_inv, nfloat\_complex\_div, nfloat\_complex\_sqrt, nfloat\_complex\_rsqrt (nfloat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nfloat/nfloat_complex_inv.html},
note = {Generated 2026-11-02}
}