Batteries user guide : Batteries.Float

`sig
type t = float
val zero : float
val one : float
external neg : float -> float = "%negfloat"
val succ : float -> float
val pred : float -> float
external abs : float -> float = "%absfloat"
val add : float -> float -> float
val sub : float -> float -> float
val mul : float -> float -> float
val div : float -> float -> float
external modulo : float -> float -> float = "caml_fmod_float" "fmod"
"float"
external pow : float -> float -> float = "caml_power_float" "pow" "float"
val min_num : float
val max_num : float
val compare : float -> float -> int
val equal : float -> float -> bool
val ord : float -> float -> BatOrd.order
external of_int : int -> float = "%floatofint"
external to_int : float -> int = "%intoffloat"
external of_float : float -> float = "%identity"
external to_float : float -> float = "%identity"
val of_string : string -> float
val to_string : float -> string
external ( + ) : t -> t -> t = "%addfloat"
external ( - ) : t -> t -> t = "%subfloat"
external ( * ) : t -> t -> t = "%mulfloat"
external ( / ) : t -> t -> t = "%divfloat"
external ( ** ) : t -> t -> t = "caml_power_float" "pow" "float"
val min : float -> float -> float
val max : float -> float -> float
val ( -- ) : t -> t -> t BatEnum.t
val ( --- ) : t -> t -> t BatEnum.t
val operations : t BatNumber.numeric
external sqrt : float -> float = "caml_sqrt_float" "sqrt" "float"
external exp : float -> float = "caml_exp_float" "exp" "float"
external log : float -> float = "caml_log_float" "log" "float"
external log10 : float -> float = "caml_log10_float" "log10" "float"
external cos : float -> float = "caml_cos_float" "cos" "float"
external sin : float -> float = "caml_sin_float" "sin" "float"
external tan : float -> float = "caml_tan_float" "tan" "float"
external acos : float -> float = "caml_acos_float" "acos" "float"
external asin : float -> float = "caml_asin_float" "asin" "float"
external atan : float -> float = "caml_atan_float" "atan" "float"
external atan2 : float -> float -> float = "caml_atan2_float" "atan2"
"float"
external cosh : float -> float = "caml_cosh_float" "cosh" "float"
external sinh : float -> float = "caml_sinh_float" "sinh" "float"
external tanh : float -> float = "caml_tanh_float" "tanh" "float"
external ceil : float -> float = "caml_ceil_float" "ceil" "float"
external floor : float -> float = "caml_floor_float" "floor" "float"
val round : float -> float
val round_to_int : float -> int
val round_to_string : ?digits:int -> float -> string
val root : float -> int -> float
val signbit : float -> bool
val copysign : float -> float -> float
val is_nan : float -> bool
val is_special : float -> bool
val is_finite : float -> bool
val infinity : float
val neg_infinity : float
val nan : float
val epsilon : float
val e : float
val log2e : float
val log10e : float
val ln2 : float
val ln10 : float
val pi : float
val pi2 : float
val pi4 : float
val invpi : float
val invpi2 : float
val sqrtpi2 : float
val sqrt2 : float
val invsqrt2 : float
external frexp : float -> float * int = "caml_frexp_float"
external ldexp : float -> int -> float = "caml_ldexp_float"
external modf : float -> float * float = "caml_modf_float"
type fpkind =
fpclass =
FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
external classify : float -> fpkind = "caml_classify_float"
val approx_equal : ?epsilon:float -> float -> float -> bool
module Infix :
sig
type bat__infix_t = t
val ( + ) : bat__infix_t -> bat__infix_t -> bat__infix_t
val ( - ) : bat__infix_t -> bat__infix_t -> bat__infix_t
val ( * ) : bat__infix_t -> bat__infix_t -> bat__infix_t
val ( / ) : bat__infix_t -> bat__infix_t -> bat__infix_t
val ( ** ) : bat__infix_t -> bat__infix_t -> bat__infix_t
val ( -- ) : bat__infix_t -> bat__infix_t -> bat__infix_t BatEnum.t
val ( --- ) : bat__infix_t -> bat__infix_t -> bat__infix_t BatEnum.t
val ( =~ ) : ?epsilon:float -> float -> float -> bool
end
module Compare :
sig
type bat__compare_t = t
val ( <> ) : bat__compare_t -> bat__compare_t -> bool
val ( >= ) : bat__compare_t -> bat__compare_t -> bool
val ( <= ) : bat__compare_t -> bat__compare_t -> bool
val ( > ) : bat__compare_t -> bat__compare_t -> bool
val ( < ) : bat__compare_t -> bat__compare_t -> bool
val ( = ) : bat__compare_t -> bat__compare_t -> bool
end
type bat__refops_t = t
val ( += ) : bat__refops_t ref -> bat__refops_t -> unit
val ( -= ) : bat__refops_t ref -> bat__refops_t -> unit
val ( *= ) : bat__refops_t ref -> bat__refops_t -> unit
val ( /= ) : bat__refops_t ref -> bat__refops_t -> unit
val print : (t, 'a) BatIO.printer
module Safe_float :
sig
type t = float
val zero : float
val one : float
val neg : float -> float
val succ : float -> float
val pred : float -> float
val abs : float -> float
val add : float -> float -> float
val sub : float -> float -> float
val mul : float -> float -> float
val div : float -> float -> float
val modulo : float -> float -> float
val pow : float -> float -> float
val min_num : float
val max_num : float
val compare : float -> float -> int
val of_int : int -> float
val to_int : float -> int
external of_float : float -> float = "%identity"
external to_float : float -> float = "%identity"
val of_string : string -> float
val to_string : float -> string
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val ( / ) : t -> t -> t
val ( ** ) : t -> t -> t
val operations : t BatNumber.numeric
val exp : float -> float
val log : float -> float
val log10 : float -> float
val cos : float -> float
val sin : float -> float
val tan : float -> float
val acos : float -> float
val asin : float -> float
val atan : float -> float
val atan2 : float -> float -> float
val cosh : float -> float
val sinh : float -> float
val tanh : float -> float
val ceil : float -> float
val floor : float -> float
val infinity : float
val neg_infinity : float
val nan : float
val is_nan : float -> bool
val epsilon : float
val pi : float
val frexp : float -> float * int
val ldexp : float -> int -> float
val modf : float -> float * float
type fpkind =
fpclass =
FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
external classify : float -> fpkind = "caml_classify_float"
val print : 'a BatInnerIO.output -> t -> unit
end
end`