package interval_crlibm

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

Functions rounding up their results.

include Interval.DIRECTED with type t = float
type t = float

Type of numbers.

val zero : t

The neutral element for addition.

val one : t

The neutral element for multiplication.

val pi : t

Upper/lower bound on π.

val two_pi : t

Upper/lower bound on 2π.

val half_pi : t

Upper/lower bound on π/2.

val e : t

Upper/lower bound on e (Euler's constant).

val float : int -> t

When t = float, the float function is exact on 32 bits machine but not on 64 bits machine with ints larger than 53 bits.

val (+.) : t -> t -> t
val (-.) : t -> t -> t
val (*.) : t -> t -> t
val (/.) : t -> t -> t
val sqr : t -> t

sqr x returns an upper/lower bound on x².

val cbr : t -> t

cbr x returns an upper/lower bound on x³.

val pow_i : t -> int -> t

pow_i x n return a upper/lower bound on xⁿ.

include Crlibm.S
val exp : float -> float
val expm1 : float -> float

expm1 x returns exp x -. 1. in a way that is accurate even for values of x near zero.

val log : float -> float
val log1p : float -> float

log1p x returns log(x +. 1.) in a way that is accurate even for values of x near zero.

val cos : float -> float
val sin : float -> float
val tan : float -> float
val cospi : float -> float

cospi x returns cos(π·x).

val sinpi : float -> float

sinpi x returns sin(π·x).

val tanpi : float -> float

tanpi x returns tan(π·x).

val asin : float -> float
val acos : float -> float
val atan : float -> float
val asinpi : float -> float

asinpi x returns (asin x)/π ∈ [-0.5, 0.5].

val acospi : float -> float

acospi x returns (acos x)/π ∈ [0., 1.].

val atanpi : float -> float

atanpi x returns (atan x)/π ∈ [-0.5, 0.5].

val cosh : float -> float
val sinh : float -> float
val log2 : float -> float
val log10 : float -> float
val tanh : t -> t

Hyperbolic tangent. This is not provided by CRlibm but is defined here for usefulness.

module U = I.U
OCaml

Innovation. Community. Security.