package crlibm

  1. Overview
  2. Docs
Binding to CRlibm, a correctly rounded math lib

Install

Dune Dependency

Authors

Maintainers

Sources

crlibm-0.4.tbz
sha256=e8c163595ca9b9dea10ddcc16ad72a461f7d83d735638f92a346a6f57d19bbde
md5=d050a60185c69f58665a170ec2a7d973

doc/crlibm/Crlibm/index.html

Module CrlibmSource

Binding to CRlibm, a library of proved correctly-rounded mathematical functions.

Version: 0.4

Sourcemodule type S = sig ... end

Common functions to the four rounding modules below.

Round to the nearest

include 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 pow : float -> float -> float

pow x y computes x to the power y. Beware that this is not proved correctly rounded for all inputs.

Round toward -∞

Sourcemodule Low : S

Round toward +∞

Sourcemodule High : S

Round toward zero

Sourcemodule Zero : S
OCaml

Innovation. Community. Security.