Flint integral polynomials utilities#
Real root isolation
-
void _fmpz_poly_scale_0_1_fmpq(fmpz *pol, slong len, fmpq_t a, fmpq_t b)#
Precompose the polynomial
pol
by an affine transformation so that the interval [a
,b
] becomes the interval [0,1]
-
int _fmpz_poly_has_real_root(fmpz *pol, slong len)#
Return 1 if the polynomial
pol
has a real root and 0 otherwise.
-
int fmpz_poly_has_real_root(fmpz_poly_t pol)#
-
slong fmpz_poly_positive_root_upper_bound_2exp(const fmpz_poly_t pol)#
Return an upper bound on the bitsize of largest real root of
pol
.
-
slong _fmpz_poly_positive_root_upper_bound_2exp(const fmpz *pol, slong len)#
Return an upper bound on the bitsize of largest real root of
(pol, len)
.
-
slong _fmpz_poly_positive_root_upper_bound_2exp_local_max(const fmpz *pol, slong len)#
-
slong fmpz_poly_num_real_roots_upper_bound(fmpz_poly_t pol)#
Return an upper bound on the number of real roots of the polynomial
pol
(currently using Descartes’ rule of sign).
-
slong _fmpz_poly_descartes_bound_0_1(fmpz *p, slong len, slong bound)#
Return an upper bound on the number of real roots between 0 and 1 of the polynomial
(p, len)
using Descartes’ rule of sign. If the result is larger thanbound
thenWORD_MAX
is returned.
-
slong _fmpz_poly_descartes_bound(fmpz *p, slong len, slong bound)#
-
void _fmpz_poly_isolate_real_roots_0_1_vca(fmpq *exact_roots, slong *n_exact_roots, fmpz *c_array, slong *k_array, slong *n_intervals, fmpz *pol, slong len)#
Isolate the real roots of
(pol, len)
contained in the interval \((0, 1)\). The arrayexact_roots
will be set by the exact dyadic roots found by the algorithm andn_exact_roots
updated accordingly. The arraysc_array
andk_array
are set to be interval data that enclose the remaining roots andn_interval
is updated accordingly. A datac = c_array + i
andk = k_array[i]
represents the open interval \((c 2^k, (c + 1) 2^k)\).
-
void fmpz_poly_isolate_real_roots(fmpq *exact_roots, slong *n_exact, fmpz *c_array, slong *k_array, slong *n_interval, fmpz_poly_t pol)#
Isolate the real roots of
pol
. The arrayexact_roots
will be set by the exact dyadic roots found by the algorithm andn_exact_roots
updated accordingly. The arraysc_array
andk_array
are set to be interval data that enclose the remaining roots andn_interval
is updated accordingly. A datac = c_array + i
andk = k_array[i]
represents the open interval \((c 2^k, (c + 1) 2^k)\).
Root refinement
-
int _fmpz_poly_newton_step_arb(arb_t res, const fmpz *pol, const fmpz *der, slong len, arb_t a, slong prec)#
-
int _fmpz_poly_bisection_step_arb(arb_t res, fmpz *pol, slong len, arb_t a, slong prec)#
-
int fmpz_poly_newton_step_arb(arb_t res, const fmpz_poly_t pol, const fmpz_poly_t der, arb_t a, slong prec)#
-
void _fmpz_poly_bisection_step_arf(arf_t l, arf_t r, const fmpz *pol, slong len, int sl, int sr, slong prec)#
-
int fmpz_poly_bisection_step_arb(arb_t res, const fmpz_poly_t pol, arb_t a, slong prec)#
-
void fmpz_poly_squarefree_part(fmpz_poly_t res, fmpz_poly_t poly)#
-
void fmpz_poly_evaluate_at_one(fmpz_t res, fmpz *p, slong len)#
Miscellaneous
-
slong fmpz_poly_num_real_roots_0_1_sturm(fmpz_poly_t pol)#
-
slong fmpz_poly_num_real_roots_0_1_vca(fmpz_poly_t pol)#
-
slong fmpz_poly_num_real_roots_0_1(fmpz_poly_t pol)#
-
slong fmpz_poly_num_real_roots_vca(fmpz_poly_t pol)#
FLINT, Arb extra
-
void fmpz_poly_abs(fmpz_poly_t res, fmpz_poly_t p)#
Set
res
to be the polynomial whose coefficients are the absolute values of the ones inp
-
void _fmpz_poly_evaluate_arb(arb_t res, const fmpz *pol, slong len, const arb_t a, slong prec)#
Evaluate the polynomial
pol
at the balla
and set result inres
-
void fmpz_poly_evaluate_arb(arb_t b, const fmpz_poly_t pol, const arb_t a, slong prec)#
-
void _fmpz_poly_evaluate_arf(arf_t res, const fmpz *pol, slong len, const arf_t a, slong prec)#
-
void fmpz_poly_evaluate_arf(arf_t res, const fmpz_poly_t pol, const arf_t a, slong prec)#
-
int _fmpz_poly_relative_condition_number_2exp(slong *cond, fmpz *p, slong len, arb_t x, slong prec)#
-
int fmpz_poly_relative_condition_number_2exp(slong *cond, fmpz_poly_t p, arb_t x, slong prec)#