FLINT3.7.0-dev

fmpz_poly_q_randtest, fmpz_poly_q_randtest_not_zero

Synopsis#include <flint/fmpz_poly_q.h>
void fmpz_poly_q_randtest(fmpz_poly_q_t poly, flint_rand_t state, slong len1, flint_bitcnt_t bits1, slong len2, flint_bitcnt_t bits2)source
void fmpz_poly_q_randtest_not_zero(fmpz_poly_q_t poly, flint_rand_t state, slong len1, flint_bitcnt_t bits1, slong len2, flint_bitcnt_t bits2)source

Set poly to a random rational function, the canonical form of a/b with a a random polynomial of length at most len1 and coefficients of at most bits1 bits (fmpz_poly_randtest) and b a random nonzero polynomial of length at most len2 and at most bits2 bits. In the _not_zero version a is nonzero as well. Lengths and bit sizes less than 1 are replaced by 1 where a nonzero polynomial is needed.

Cite this page

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