arf_complex_mul, arf_complex_mul_fallback
#include <flint/arf.h>int arf_complex_mul(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)sourceint arf_complex_mul_fallback(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)sourceSet e + fi = (a + bi)(c + di) with both parts correctly rounded. Bit 0 of the return value is the inexact flag of e and bit 1 that of f.
If one of a, b, c, d is zero, the product is computed with two real multiplications and no additions, even if another component is infinite or NaN; special values follow from this rule. arf_complex_mul forms the exact products of the mantissas and rounds ac - bd and ad + bc once each; when all four mantissas have at least 20 limbs and the exponents of the real and imaginary parts are within 64 bits of each other, it uses Karatsuba's three-product formula ad + bc = (a+b)(c+d) - ac - bd. arf_complex_mul_fallback is the plain version with four products, kept for testing.
The FLINT team, “arf_complex_mul, arf_complex_mul_fallback (arf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arf/arf_complex_mul.html (generated 2026-10-20).
@misc{flint-doc-arf-arf-complex-mul,
author = {{The FLINT team}},
title = {{arf\_complex\_mul, arf\_complex\_mul\_fallback (arf.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arf/arf_complex_mul.html},
note = {Generated 2026-10-20}
}