FLINT3.7.0-dev

nf_elem_mul, nf_elem_mul_red

Synopsis#include <flint/nf_elem.h>
void nf_elem_mul(nf_elem_t a, const nf_elem_t b, const nf_elem_t c, const nf_t nf)source
void nf_elem_mul_red(nf_elem_t a, const nf_elem_t b, const nf_elem_t c, const nf_t nf, int red)source

Set aa to bcbc, canonicalised. With red =0= 0 the product is not reduced modulo ff, which allows sums of products to be reduced once with nf_elem_reduce. The inputs must be reduced.

The numerators are multiplied in Z[x]\mathbb{Z}[x] and the denominators in Z\mathbb{Z}. For d≥3d \ge 3 the product of length up to 2d−12d - 1 is reduced with the precomputed powers θd,…,θ2d−2\theta^d, \ldots, \theta^{2d-2} if d<30d < 30, and by division with remainder otherwise; for d=2d = 2 one step θ2=−(f1θ+f0)/f2\theta^2 = -(f_1\theta + f_0)/f_2 suffices, and for Q(i)\mathbf{Q}(i) a dedicated formula with a gcd for the denominator is used (Multiplication and reduction).

Guides#

Cite this page

The FLINT team, “nf_elem_mul, nf_elem_mul_red (nf_elem.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nf_elem/nf_elem_mul.html (generated 2026-11-02).