module OrderedPoly: sig
.. end
Polynomials with ordered variables and integer coefficients.
Basic Type Definitions
type
polynomial =
type
t = polynomial
to be compatible with OrderedType signature
exception Unmatched_variables
val const : int -> polynomial
Constructur 'Const' but taking normal integers.
Printing
val str : polynomial -> string
Equality and Comparison
val is_zero : polynomial -> bool
val equal : polynomial -> polynomial -> bool
val compare : polynomial -> polynomial -> int
val var : polynomial -> string
val lower : polynomial -> polynomial
val constant_value : polynomial -> Numbers.num option
val deg : polynomial -> int
val leading_coeff : int -> polynomial -> polynomial
val const_coeff : polynomial -> polynomial option
val omit_leading : polynomial -> polynomial
val multiple : int -> polynomial -> polynomial
val multiple_num : Numbers.num -> polynomial -> polynomial
val constant_factors : polynomial ->
polynomial -> (Numbers.num * Numbers.num) option
Arithmetic Functions
val add : polynomial -> polynomial -> polynomial
val neg : polynomial -> polynomial
val sub : polynomial -> polynomial -> polynomial
val mul : polynomial -> polynomial -> polynomial
val pow : polynomial -> int -> polynomial
val div : ?allow_frac:bool ->
polynomial -> polynomial -> polynomial
val div_rest : ?allow_frac:bool ->
polynomial ->
polynomial -> polynomial * polynomial
Differentiation
val diff : polynomial -> polynomial
Modified remainder
val modified_remainder : polynomial -> polynomial -> polynomial