module Scalar:sig..end
type t =
| |
Float of |
| |
Mpqf of |
| |
Mpfrf of |
APRON Scalar numbers.
See Mpqf for operations on GMP multiprecision rational numbers and Mpfr for operations on MPFR multi-precision floating-point numbers.
val of_mpq : Mpq.t -> t
val of_mpqf : Mpqf.t -> t
val of_int : int -> t
val of_frac : int -> int -> tCreate a scalar of type Mpqf from resp.
Mpq.t Mpqf.t x/yval of_mpfr : Mpfr.t -> t
val of_mpfrf : Mpfrf.t -> tCreate a scalar of type Mpfrf with the given value
val of_float : float -> tCreate a scalar of type Float with the given value
val of_infty : int -> tCreate a scalar of type Float with the value multiplied by
infinity (resulting in minus infinity, zero, or infinity
val is_infty : t -> intInfinity test.
is_infty x returns -1 if x is -oo, 1 if x is +oo, and 0 if x is
finite.
val sgn : t -> intReturn the sign of the coefficient, which may be a negative value, zero or a positive value.
val cmp : t -> t -> intCompare two coefficients, possibly converting to Mpqf.t.
cmp x y returns a negative number if x is less than y,
0 if they are equal, and a positive number if x is greater than y.
val cmp_int : t -> int -> intCompare a coefficient with an integer
val equal : t -> t -> boolEquality test, possibly using a conversion to Mpqf.t.
Return true if the 2 values are equal. Two infinite values of the same
signs are considered as equal.
val equal_int : t -> int -> boolEquality test with an integer
val neg : t -> tNegation
val to_string : t -> stringConversion to string, using string_of_double, Mpqf.to_string or Mpfr.to_string
val print : Stdlib.Format.formatter -> t -> unitPrint a coefficient