package crlibm

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

Install

Dune Dependency

Authors

Maintainers

Sources

crlibm-0.5.1.tbz
sha256=fcc6ff4497eb168a91bac7967316164ff0d3e1ee776fed958718a9cd7c49983b
sha512=1b62bde2d45b74ef4b15b015c90bb0f0a292180b6436f8deab81d54ab08b9cede9265c82b309a4e5377f97181049d1430bce8867df025a09859f503de0eb8032

doc/crlibm/Crlibm/index.html

Module CrlibmSource

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

Version: 0.5.1

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 to be correctly rounded for all inputs.

Round toward -∞

Sourcemodule Low = RoundDown

Round toward +∞

Sourcemodule RoundUp : S
Sourcemodule High = RoundUp

Round toward zero

Sourcemodule Zero = RoundToZero
OCaml

Innovation. Community. Security.