FLINT3.7.0-dev

flint_mpn_mulhigh_n_complex, flint_mpn_sqrhigh_n_complex

Synopsis#include <flint/mpn_extras.h>
void flint_mpn_mulhigh_n_complex(nn_ptr zr, int * zr_sgn, nn_ptr zi, int * zi_sgn, nn_srcptr ar, int ar_sgn, nn_srcptr ai, int ai_sgn, nn_srcptr br, int br_sgn, nn_srcptr bi, int bi_sgn, mp_size_t n)source
void flint_mpn_sqrhigh_n_complex(nn_ptr zr, int * zr_sgn, nn_ptr zi, int * zi_sgn, nn_srcptr ar, int ar_sgn, nn_srcptr ai, int ai_sgn, mp_size_t n)source

High products: all parts have n limbs, and each output part receives exactly n + 1 limbs, zero padded, approximating the limbs [n, 2n] of the exact part, together with its sign.

Relative to the exact value, the error is below 2 + 3(n + 4)/B units of the lowest returned limb for the product and below 2 + 2(n + 4)/B for the square, hence below 3 units for any practical n: each underlying flint_mpn_mulhigh_n, read as n limbs, errs by an amount in (-1 - \varepsilon, \varepsilon) units with \varepsilon = (n + 4)/B, and each output part combines at most three of them. The transformed path stays within (-1.5, 0.5) units.

Cite this page

The FLINT team, “flint_mpn_mulhigh_n_complex, flint_mpn_sqrhigh_n_complex (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_mulhigh_n_complex.html (generated 2026-10-20).