package interval_crlibm

  1. Overview
  2. Docs

Module Interval_crlibm.RoundDownSource

Functions rounding down their results.

include Interval_base.DIRECTED with type t = float
Sourcetype t = float

Type of numbers.

Sourceval zero : t

The neutral element for addition.

Sourceval one : t

The neutral element for multiplication.

Sourceval pi : t

Upper/lower bound on π.

Sourceval two_pi : t

Upper/lower bound on 2π.

Sourceval half_pi : t

Upper/lower bound on π/2.

Sourceval euler : t

Upper/lower bound on Euler's constant.

Sourceval 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.

Sourceval dist : t -> t -> t

dist x y return the distance between x and y (i.e., |x-y|) rounded up or down according to the module.

  • since 1.6
Sourceval (+.) : t -> t -> t
Sourceval (-.) : t -> t -> t
Sourceval (*.) : t -> t -> t
Sourceval (/.) : t -> t -> t
Sourceval sqr : t -> t

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

Sourceval cbr : t -> t

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

Sourceval pow_i : t -> int -> t

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

Sourceval sqrt : t -> t

sqrt x return the square root of x rounded up/down.

Sourceval hypot : t -> t -> t

hypot x y returns sqrt(x *. x + y *. y) rounded up/down. Returns NaN if any of the arguments is NaN.

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

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

Sourceval log : float -> float
Sourceval log1p : float -> float

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

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

cospi x returns cos(π·x).

Sourceval sinpi : float -> float

sinpi x returns sin(π·x).

Sourceval tanpi : float -> float

tanpi x returns tan(π·x).

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

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

Sourceval acospi : float -> float

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

Sourceval atanpi : float -> float

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

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

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

Sourcemodule U = I.U
OCaml

Innovation. Community. Security.