FLINT3.7.0-dev

aprcl_config_jacobi_init, aprcl_config_jacobi_init_R, aprcl_config_jacobi_clear

Synopsis#include <flint/aprcl.h>
void aprcl_config_jacobi_init(aprcl_config conf, const fmpz_t n)source
void aprcl_config_jacobi_init_R(aprcl_config conf, const fmpz_t n, ulong R)source
void aprcl_config_jacobi_clear(aprcl_config conf)source

Initialise conf for the Jacobi sum test of n, with R from aprcl_R_value respectively the given R, and free it. If the value of aprcl_R_value does not give s^2 > n, aprcl_config_jacobi_init multiplies R by the next primes after its largest prime factor until it does (throwing an exception if R would overflow a word). The full s for R is reduced by dropping the prime powers q^e whose tests are the most expensive per bit contributed to s (estimated from the sizes of \varphi(p^k) for p^k \| q - 1, and very large q first) as long as s^2 > n remains.

Cite this page

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