package mopsa

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Double precision operations.

Operations

val add_near : t -> t -> t
val add_up : t -> t -> t
val add_down : t -> t -> t
val add_zero : t -> t -> t

Addition

val sub_near : t -> t -> t
val sub_up : t -> t -> t
val sub_down : t -> t -> t
val sub_zero : t -> t -> t

Subtraction

val mul_near : t -> t -> t
val mul_up : t -> t -> t
val mul_down : t -> t -> t
val mul_zero : t -> t -> t

Multiplication

val mulz_near : t -> t -> t
val mulz_up : t -> t -> t
val mulz_down : t -> t -> t
val mulz_zero : t -> t -> t

Special multiplication where 0 * ∞ is 0, not NaN. This is particularly useful for interal bounds.

val div_near : t -> t -> t
val div_up : t -> t -> t
val div_down : t -> t -> t
val div_zero : t -> t -> t

Division

val divz_near : t -> t -> t
val divz_up : t -> t -> t
val divz_down : t -> t -> t
val divz_zero : t -> t -> t

Special division where 0 / 0 and ∞ / ∞ are 0, not NaN. This is particularly useful for interal bounds.

val mod_near : t -> t -> t
val mod_up : t -> t -> t
val mod_down : t -> t -> t
val mod_zero : t -> t -> t

Remainder.

val square_near : t -> t
val square_up : t -> t
val square_down : t -> t
val square_zero : t -> t

Square.

val sqrt_near : t -> t
val sqrt_up : t -> t
val sqrt_down : t -> t
val sqrt_zero : t -> t

Square root.

val round_int_near : t -> t
val round_int_up : t -> t
val round_int_down : t -> t
val round_int_zero : t -> t

Rounding to an integer.

val of_int_near : int -> t
val of_int_up : int -> t
val of_int_down : int -> t
val of_int_zero : int -> t

Conversion from int with rounding.

val of_int64_near : int64 -> t
val of_int64_up : int64 -> t
val of_int64_down : int64 -> t
val of_int64_zero : int64 -> t

Conversion from int64 with rounding.

val of_z_near : Z.t -> float
val of_z_up : Z.t -> float
val of_z_down : Z.t -> float
val of_z_zero : Z.t -> float

Conversion from Zarith with rounding.

Floating-point format characteristics

val mantissa_bits : int
val exponent_bits : int
val exponent_bias : int
val min_exponent : int
val max_exponent : int
val nan_infinity_exponent : int
val min_denormal : t
val min_normal : t
val max_normal : t
val max_exact : t
val ulp : t

Units in the last place (relative precision).

val rep_of_bits : int64 -> bit_float
val bits_of_rep : bit_float -> int64
val to_bits : t -> int64
val of_bits : int64 -> t
val succ : t -> t
val pred : t -> t

Returns the float immediately following or preceeding the argument.

val succ_zero : t -> t
val pred_zero : t -> t

As succ and pred, but does not cross zero.

val of_string_up : string -> t
val of_string_down : string -> t

Conversion from string.

OCaml

Innovation. Community. Security.