stdcompat

Compatibility module for OCaml standard library
Library stdcompat
Module Stdcompat . Stdlib . Float
type fpclass = fpclass =
| FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
  • since 4.07.0:

type fpclass = Stdlib.fpclass = | FP_normal | FP_subnormal | FP_zero | FP_infinite | FP_nan

type t = float
  • since 4.07.0: type t = float
module Array = Float.Array
  • since 4.08.0: module Array = Float.Array
module ArrayLabels = Float.ArrayLabels
  • since 4.08.0: module ArrayLabels = Float.ArrayLabels
val cbrt : float -> float
  • since 4.13.0:

external cbrt : float -> float = "caml_cbrt_float" "caml_cbrt"@@unboxed @@noalloc

val exp2 : float -> float
  • since 4.13.0:

external exp2 : float -> float = "caml_exp2_float" "caml_exp2"@@unboxed @@noalloc

val log2 : float -> float
  • since 4.13.0:

external log2 : float -> float = "caml_log2_float" "caml_log2"@@unboxed @@noalloc

val acosh : float -> float
  • since 4.13.0:

external acosh : float -> float = "caml_acosh_float" "caml_acosh" @@unboxed @@noalloc

val asinh : float -> float
  • since 4.13.0:

external asinh : float -> float = "caml_asinh_float" "caml_asinh" @@unboxed @@noalloc

val atanh : float -> float
  • since 4.13.0:

external atanh : float -> float = "caml_atanh_float" "caml_atanh" @@unboxed @@noalloc

val erf : float -> float
  • since 4.13.0:

external erf : float -> float = "caml_erf_float" "caml_erf"@@unboxed @@noalloc

val erfc : float -> float
  • since 4.13.0:

external erfc : float -> float = "caml_erfc_float" "caml_erfc"@@unboxed @@noalloc

val zero : float
  • since 4.08.0: val zero : float
val one : float
  • since 4.08.0: val one : float
val minus_one : float
  • since 4.08.0: val minus_one : float
val fma : float -> float -> float -> float
  • since 4.08.0:

external fma : float -> float -> float -> float = "caml_fma_float" "caml_fma"@@unboxed @@noalloc

val succ : float -> float
  • since 4.08.0: val succ : float -> float
val pred : float -> float
  • since 4.08.0: val pred : float -> float
val is_finite : float -> bool
  • since 4.08.0: val is_finite : float -> bool
val is_infinite : float -> bool
  • since 4.08.0: val is_infinite : float -> bool
val is_nan : float -> bool
  • since 4.08.0: val is_nan : float -> bool
val is_integer : float -> bool
  • since 4.08.0: val is_integer : float -> bool
val trunc : float -> float
  • since 4.08.0:

external trunc : float -> float = "caml_trunc_float" "caml_trunc" @@unboxed @@noalloc

val round : float -> float
  • since 4.08.0:

external round : float -> float = "caml_round_float" "caml_round" @@unboxed @@noalloc

val next_after : float -> float -> float
  • since 4.08.0:

external next_after : float -> float -> float = "caml_nextafter_float" "caml_nextafter" @@unboxed @@noalloc

val copy_sign : float -> float -> float
  • since 4.08.0:

external copy_sign : float -> float -> float = "caml_copysign_float" "caml_copysign" @@unboxed @@noalloc

val sign_bit : float -> bool
  • since 4.08.0:

external sign_bit : ((float)@unboxed ) -> bool = "caml_signbit_float" "caml_signbit" @@noalloc

val min : t -> t -> t
  • since 4.08.0: val min : t -> t -> t
val max : float -> float -> float
  • since 4.08.0: val max : float -> float -> float
val min_max : float -> float -> float * float
  • since 4.08.0: val min_max : float -> float -> (float * float)
val min_num : t -> t -> t
  • since 4.08.0: val min_num : t -> t -> t
val max_num : t -> t -> t
  • since 4.08.0: val max_num : t -> t -> t
val min_max_num : float -> float -> float * float
  • since 4.08.0: val min_max_num : float -> float -> (float * float)
val neg : float -> float
  • since 4.07.0: external neg : float -> float = "%negfloat"
val add : float -> float -> float
  • since 4.07.0: external add : float -> float -> float = "%addfloat"
val sub : float -> float -> float
  • since 4.07.0: external sub : float -> float -> float = "%subfloat"
val mul : float -> float -> float
  • since 4.07.0: external mul : float -> float -> float = "%mulfloat"
val div : float -> float -> float
  • since 4.07.0: external div : float -> float -> float = "%divfloat"
val rem : float -> float -> float
  • since 4.07.0:

external rem : float -> float -> float = "caml_fmod_float" "fmod" @@unboxed @@noalloc

val abs : float -> float
  • since 4.07.0: external abs : float -> float = "%absfloat"
val infinity : float
  • since 4.07.0: val infinity : float
val neg_infinity : float
  • since 4.07.0: val neg_infinity : float
val nan : float
  • since 4.07.0: val nan : float
val pi : float
  • since 4.07.0: val pi : float
val max_float : float
  • since 4.07.0: val max_float : float
val min_float : float
  • since 4.07.0: val min_float : float
val epsilon : float
  • since 4.07.0: val epsilon : float
val of_int : int -> float
  • since 4.07.0: external of_int : int -> float = "%floatofint"
val to_int : float -> int
  • since 4.07.0: external to_int : float -> int = "%intoffloat"
val of_string : string -> float
  • since 4.07.0:

external of_string : string -> float = "caml_float_of_string"

val of_string_opt : string -> float option
  • since 4.07.0: val of_string_opt : string -> float option
val to_string : float -> string
  • since 4.07.0: val to_string : float -> string
val classify_float : float -> fpclass
  • since 4.07.0:

external classify_float : ((float)@unboxed ) -> fpclass = "caml_classify_float" "caml_classify_float_unboxed"@@noalloc

val pow : float -> float -> float
  • since 4.07.0:

external pow : float -> float -> float = "caml_power_float" "pow" @@unboxed @@noalloc

val sqrt : float -> float
  • since 4.07.0:

external sqrt : float -> float = "caml_sqrt_float" "sqrt"@@unboxed @@noalloc

val exp : float -> float
  • since 4.07.0:

external exp : float -> float = "caml_exp_float" "exp"@@unboxed @@noalloc

val log : float -> float
  • since 4.07.0:

external log : float -> float = "caml_log_float" "log"@@unboxed @@noalloc

val log10 : float -> float
  • since 4.07.0:

external log10 : float -> float = "caml_log10_float" "log10"@@unboxed @@noalloc

val expm1 : float -> float
  • since 4.07.0:

external expm1 : float -> float = "caml_expm1_float" "caml_expm1" @@unboxed @@noalloc

val log1p : float -> float
  • since 4.07.0:

external log1p : float -> float = "caml_log1p_float" "caml_log1p" @@unboxed @@noalloc

val cos : float -> float
  • since 4.07.0:

external cos : float -> float = "caml_cos_float" "cos"@@unboxed @@noalloc

val sin : float -> float
  • since 4.07.0:

external sin : float -> float = "caml_sin_float" "sin"@@unboxed @@noalloc

val tan : float -> float
  • since 4.07.0:

external tan : float -> float = "caml_tan_float" "tan"@@unboxed @@noalloc

val acos : float -> float
  • since 4.07.0:

external acos : float -> float = "caml_acos_float" "acos"@@unboxed @@noalloc

val asin : float -> float
  • since 4.07.0:

external asin : float -> float = "caml_asin_float" "asin"@@unboxed @@noalloc

val atan : float -> float
  • since 4.07.0:

external atan : float -> float = "caml_atan_float" "atan"@@unboxed @@noalloc

val atan2 : float -> float -> float
  • since 4.07.0:

external atan2 : float -> float -> float = "caml_atan2_float" "atan2" @@unboxed @@noalloc

val hypot : float -> float -> float
  • since 4.07.0:

external hypot : float -> float -> float = "caml_hypot_float" "caml_hypot"@@unboxed @@noalloc

val cosh : float -> float
  • since 4.07.0:

external cosh : float -> float = "caml_cosh_float" "cosh"@@unboxed @@noalloc

val sinh : float -> float
  • since 4.07.0:

external sinh : float -> float = "caml_sinh_float" "sinh"@@unboxed @@noalloc

val tanh : float -> float
  • since 4.07.0:

external tanh : float -> float = "caml_tanh_float" "tanh"@@unboxed @@noalloc

val ceil : float -> float
  • since 4.07.0:

external ceil : float -> float = "caml_ceil_float" "ceil"@@unboxed @@noalloc

val floor : float -> float
  • since 4.07.0:

external floor : float -> float = "caml_floor_float" "floor"@@unboxed @@noalloc

val frexp : float -> float * int
  • since 4.07.0:

external frexp : float -> (float * int) = "caml_frexp_float"

val ldexp : float -> int -> float
  • since 4.07.0:

external ldexp : ((float)@unboxed ) -> ((int)@untagged ) -> ((float)@unboxed ) = "caml_ldexp_float" "caml_ldexp_float_unboxed"@@noalloc

val modf : float -> float * float
  • since 4.07.0:

external modf : float -> (float * float) = "caml_modf_float"

val compare : t -> t -> int
  • since 4.07.0: val compare : t -> t -> int
val equal : t -> t -> bool
  • since 4.07.0: val equal : t -> t -> bool
val hash : t -> int
  • since 4.07.0: val hash : t -> int