Pari.Polynomial
type 'a t = 'a polynomial ty constraint 'a = 'b ty
val to_string : 'a t -> string
val eval : 'a t -> 'a -> 'a
val degree : 'a t -> int
val create : 'a array -> 'a t
create a
returns a_{n-1} X^{n-1} + ... + a_0
for array a
of length n
.
# let q = Polynomial.create
[|
Integer.of_int 1;
Integer.of_int (-111);
Integer.of_int 6064;
Integer.of_int (-189804);
|];;
val q : Integer.t Polynomial.t = <abstr>
# Polynomial.to_string q;;
- : string = "x^3 - 111*x^2 + 6064*x - 189804"
# let zero = Polynomial.create [| Integer.of_int 0 |];;
val zero : Integer.t Polynomial.t = <abstr>
# let qq = Polynomial.create [| q; q; zero; zero |];;
val qq : Integer.t Polynomial.t Polynomial.t = <abstr>
# Polynomial.to_string qq;;
- : string =
"(x^3 - 111*x^2 + 6064*x - 189804)*y^3 + (x^3 - 111*x^2 + 6064*x - 189804)*y^2"
val of_string : string -> 'a t option
val is_irreducible : 'a t -> bool
minimal p
reduces p
to be the minimal polynomial of the roots of p
over the field of the rational numbers.
# let q = Polynomial.create
[|
(Rational.of_int 1);
(Rational.of_int (-111));
(Rational.of_int 6064);
(Rational.of_int (-189804));
|];;
val q : Rational.t Polynomial.t = <abstr>
# Polynomial.to_string q;;
- : string = "x^3 - 111*x^2 + 6064*x - 189804"
# let qmin = Polynomial.minimal q;;
val qmin : Rational.t Polynomial.t = <abstr>
# Polynomial.to_string qmin;;
- : string = "x^3 - x^2 - 60*x - 364"
# Number_field.(are_isomorphic (create q) (create qmin));
- : bool = true
val (.%[]) : 'a t -> int -> 'a
val roots_ff : finite_field ty t -> (finite_field ty, [ `ROW ]) Vector.t
val fold_left : f:('b -> 'a -> 'a) -> acc:'a -> 'b t -> 'a
val pol1_f2xx : Signed.long -> Signed.long -> 'a ty
val polx_f2xx : Signed.long -> Signed.long -> 'a ty
val pol1_flxx : Signed.long -> Signed.long -> 'a ty
val polx_flxx : Signed.long -> Signed.long -> 'a ty
val polisclass : 'a ty -> Signed.long
val polteichmuller : 'a ty -> pari_ulong -> Signed.long -> 'a ty
val poliscyclo : 'a ty -> Signed.long
val poliscycloprod : 'a ty -> Signed.long
val polhermite : Signed.long -> Signed.long -> 'a ty
val pollegendre : Signed.long -> Signed.long -> 'a ty
val pollegendre_reduced : Signed.long -> Signed.long -> 'a ty
val polchebyshev : Signed.long -> Signed.long -> Signed.long -> 'a ty
val polchebyshev1 : Signed.long -> Signed.long -> 'a ty
val polchebyshev2 : Signed.long -> Signed.long -> 'a ty
val poldegree : 'a ty -> Signed.long -> Signed.long
val pol0_f2x : Signed.long -> 'a ty
val pol1_f2x : Signed.long -> 'a ty
val polx_f2x : Signed.long -> 'a ty
val polx_zx : Signed.long -> 'a ty
val pol_x_powers : Signed.long -> Signed.long -> 'a ty
val polmodular_zm : Signed.long -> Signed.long -> 'a ty
val polmodular_zxx :
Signed.long ->
Signed.long ->
Signed.long ->
Signed.long ->
'a ty
val polsubcyclo : Signed.long -> Signed.long -> Signed.long -> 'a ty
val polzag : Signed.long -> Signed.long -> 'a ty
val pol_x : Signed.long -> 'a ty
val pol_xn : Signed.long -> Signed.long -> 'a ty
val pol_xnall : Signed.long -> Signed.long -> 'a ty
val polxn_flx : Signed.long -> Signed.long -> 'a ty
val pol_1 : Signed.long -> 'a ty
val pol_0 : Signed.long -> 'a ty
val pol0_flx : Signed.long -> 'a ty
val pol1_flx : Signed.long -> 'a ty
val polx_flx : Signed.long -> 'a ty