module Rat_poly: sig
.. end
Provides type rat_poly : polynomials in one variable and whose coefficients are rational
numbers, and operations involving them.
type
rat_poly =
Every polynomial (in one variable and whose coefficients are rational numbers) is given
a unique representation.
val null_poly : unit -> rat_poly
Constructs the polynomial zero.
val cons_poly : Rat.rat * rat_poly -> rat_poly
Constructs the polynomial a + Xp given the pair (a, p) where a is a rational and p is a
polynomial.
- Error if a = 0 and p is the polynomial zero.
val is_null_poly : rat_poly -> bool
Tests whether a polynomial is the polynomial zero.
val inv_cons_poly : rat_poly -> Rat.rat * rat_poly
Returns the pair (a, p) given the polynomial a + Xp.
- Error if the given polynomial is the polynomial zero.
val coef_deg_list_of_poly : rat_poly -> (Rat.rat * int) list
val string_of_poly : rat_poly -> string
Returns a string representation of a polynomial.
val pr_poly : 'a -> rat_poly -> unit
val print_rat_poly : rat_poly -> unit
Prints a string representation of a polynomial.