Module Std.Float


module Float: sig .. end
Float overloadings and optimized functions

val overloading : Delimited_overloading.t
In addition to the above overloadings, the usual float functions like sqrt, exp, cos, sin, acos, floor,... are the Pervasives ones. Also abs is an alias for abs_float. max and min are optimized for floats and ignore nan (i.e. max x nan = max nan x = x, min x nan = min nan x = x) as mandated by IEEE Std 754-2008. The function is_nan is available. The power operator is specialized so that writing e.g. x**2 is translated into x *. x. The constant pi and function hypot are available.
val eq : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
An expression for the equality function ( = ) : float -> float -> bool, optimized for floats.
val ne : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
same as eq but for <>
val lt : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
same as eq but for <
val le : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
same as eq but for <=
val gt : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
same as eq but for >
val ge : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
same as eq but for >=
val compare : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Relocatable expression for a specialized comparison function.
val neg : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
An alternate identifier for ~-. that performs float unary negation even if the identifier ~-. has been redefined.
val add : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
An alternate identifier for +. that performs float addition even if the identifier +. has been redefined.
val sub : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Similar to add but for -.
val mul : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Similar to add but for *.
val div : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Similar to add but for /.
val pow : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Similar to add but for **
val abs : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Similar to add but for abs_float
val max : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Optimized implementation for max
val min : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Optimized implementation for min
val pi : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Expression for the constant pi
val hypot : Camlp4.PreCast.Syntax.Ast.Loc.t -> Camlp4.PreCast.Syntax.Ast.expr
Expression for hypot x y which computes sqrt(x *. x +. y *. y) without undue underflow or overflow.