FLINT3.7.0-dev

_unity_zp_mul_special, _unity_zp_sqr_special

Synopsis#include <flint/aprcl.h>
int _unity_zp_mul_special(unity_zp f, const unity_zp g, const unity_zp h, fmpz * t)source
int _unity_zp_sqr_special(unity_zp f, const unity_zp g, fmpz * t)source

If a hand-optimised straight-line program exists for p^{exp} (currently 3, 4, 5, 7, 8, 9 and 16), the operands have full length \varphi(p^{exp}) and the modulus is small enough (a few thousand bits) that the smaller number of multiplications pays off, compute the reduced product (or square) using t (at least SQUARING_SPACE values) as temporary space and return 1; otherwise return 0.

Cite this page

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