math v0.0.1 Math

Mathematical functions and constants.

Summary

Functions

Equality-ish test for whether x and y are nearly equal

Computes the arc cosine of x

Computes the inverse hyperbolic cosine of x

Computes the arc sine of x

Computes the inverse hyperbolic sine of x

Computes the arc tangent of x

Computes the arc tangent given y and x

Computes the inverse hyperbolic tangent of x

Computes the cosine of x

Computes the hyperbolic cosine of x (expressed in radians)

e()

The mathematical constant E (e)

Returns e to the xth power

Returns the natural logarithm (base e) of x

Computes the logarithm (base 10) of x

Returns the logarithm (base 2) of x

The mathematical constant PI

Returns x to the yth power

Computes the sine of x

Computes the hyperbolic sine of x (expressed in radians)

Returns the non-negative square root of x

Computes the tangent of x (expressed in radians)

Computes the hyperbolic tangent of x (expressed in radians)

The mathematical constant TAU

Types

x :: number
y :: number

Functions

x <~> y

Specs

number <~> number :: boolean

Equality-ish test for whether x and y are nearly equal.

acos(x)

Specs

acos(x) :: float

Computes the arc cosine of x.

acosh(x)

Specs

acosh(x) :: float

Computes the inverse hyperbolic cosine of x.

asin(x)

Specs

asin(x) :: float

Computes the arc sine of x.

asinh(x)

Specs

asinh(x) :: float

Computes the inverse hyperbolic sine of x.

atan(x)

Specs

atan(x) :: float

Computes the arc tangent of x.

atan2(y, x)

Specs

atan2(y, x) :: float

Computes the arc tangent given y and x.

atanh(x)

Specs

atanh(x) :: float

Computes the inverse hyperbolic tangent of x.

cos(x)

Specs

cos(x) :: float

Computes the cosine of x.

cosh(x)

Specs

cosh(x) :: float

Computes the hyperbolic cosine of x (expressed in radians).

e()

Specs

e :: float

The mathematical constant E (e).

exp(x)

Specs

exp(x) :: float

Returns e to the xth power.

log(x)

Specs

log(x) :: float

Returns the natural logarithm (base e) of x.

log10(x)

Specs

log10(x) :: float

Computes the logarithm (base 10) of x.

log2(x)

Specs

log2(x) :: float

Returns the logarithm (base 2) of x.

pi()

Specs

pi :: float

The mathematical constant PI.

pow(x, y)

Specs

pow(x, y) :: float

Returns x to the yth power.

sin(x)

Specs

sin(x) :: float

Computes the sine of x.

sinh(x)

Specs

sinh(x) :: float

Computes the hyperbolic sine of x (expressed in radians).

sqrt(x)

Specs

sqrt(x) :: float

Returns the non-negative square root of x.

tan(x)

Specs

tan(x) :: float

Computes the tangent of x (expressed in radians).

tanh(x)

Specs

tanh(x) :: float

Computes the hyperbolic tangent of x (expressed in radians).

tau()

Specs

tau :: float

The mathematical constant TAU.