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 a to bc, canonicalised. With red = 0 the product is not reduced modulo f, which allows sums of products to be reduced once with nf_elem_reduce. The inputs must be reduced.

The numerators are multiplied in \mathbb{Z}[x] and the denominators in \mathbb{Z}. For d \ge 3 the product of length up to 2d - 1 is reduced with the precomputed powers \theta^d, \ldots, \theta^{2d-2} if d < 30, and by division with remainder otherwise; for d = 2 one step \theta^2 = -(f_1\theta + f_0)/f_2 suffices, and for \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-10-20).