FLINT3.7.0-dev

mp_real_mul_complex

Synopsis#include <flint/mp_real.h>
void mp_real_mul_complex(mp_real_t rr, mp_real_t ri, const mp_real_t ar, const mp_real_t ai, const mp_real_t br, const mp_real_t bi, slong n)source

Set r_r + i r_i to (a_r + i a_i)(b_r + i b_i), to about n limbs relative to the larger part of the result. The outputs may alias the inputs but not each other.

Both parts of the result, and both parts of each operand, are kept down to the same last limb: the precision of a complex number is that of its modulus, and an accumulation of \prod_k \exp(i x_k) needs its small imaginary part to the absolute precision of the frame. The product is one call to flint_mpn_mul_complex (its high half, flint_mpn_mulhigh_n_complex, for long operands), which shares the transforms of the four parts instead of making four products.

Cite this page

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