Module Ask.Float

Floating point numbers.

val v : float -> float value

v x is the literal float x.

val zero : float value

zero is v 0.0.

val one : float value

one is v 1.0.

Predicates and comparisons

val equal : float value -> float value -> bool value

equal x y is floating point equality.

val (=) : float value -> float value -> bool value

x = y is floating point equality.

Arithmetic operators

val (~-.) : float value -> float value

~-.x is the floating point negation of x.

val (+.) : float value -> float value -> float value

x +. y is floating point addition.

val (-.) : float value -> float value -> float value

x +. y is floating point subtraction.

val (*.) : float value -> float value -> float value

x *. y is floating point addition.

val (/.) : float value -> float value -> float value

x /. y is floating point division.

Conversions

val of_bool : bool value -> float value

of_bool b is b as a float value.

val of_int : int value -> float value

of_int i is i as a float value.

val of_int64 : int64 value -> float value

of_int i is i as a float value.

val of_string : string value -> float value

of_string s converts s to string if s can't be parsed this results in 0.