Janet 1.0.0-dev Documentation

Math Module

Index

math/abs math/acos math/asin math/atan math/atan2 math/ceil math/cos math/cosh math/e math/exp math/floor math/inf math/log math/log10 math/pi math/pow math/random math/seedrandom math/sin math/sinh math/sqrt math/tan math/tanh


math/abs cfunction
(math/abs x)

Return the absolute value of x.

math/acos cfunction
(math/acos x)

Returns the arccosine of x.

math/asin cfunction
(math/asin x)

Returns the arcsine of x.

math/atan cfunction
(math/atan x)

Returns the arctangent of x.

math/atan2 cfunction
(math/atan2 y x)

Return the arctangent of y/x. Works even when x is 0.

math/ceil cfunction
(math/ceil x)

Returns the smallest integer value number that is not less than x.

math/cos cfunction
(math/cos x)

Returns the cosine of x.

math/cosh cfunction
(math/cosh x)

Return the hyperbolic cosine of x.

math/e number
The base of the natural log.

math/exp cfunction
(math/exp x)

Returns e to the power of x.

math/floor cfunction
(math/floor x)

Returns the largest integer value number that is not greater than x.

math/inf number
The number representing positive infinity

math/log cfunction
(math/log x)

Returns log base 2 of x.

math/log10 cfunction
(math/log10 x)

Returns log base 10 of x.

math/pi number
The value pi.

math/pow cfunction
(math/pow a x)

Return a to the power of x.

math/random cfunction
(math/random)

Returns a uniformly distributed random number between 0 and 1.

math/seedrandom cfunction
(math/seedrandom seed)

Set the seed for the random number generator. 'seed' should be an an integer.

math/sin cfunction
(math/sin x)

Returns the sine of x.

math/sinh cfunction
(math/sinh x)

Return the hyperbolic sine of x.

math/sqrt cfunction
(math/sqrt x)

Returns the square root of x.

math/tan cfunction
(math/tan x)

Returns the tangent of x.

math/tanh cfunction
(math/tanh x)

Return the hyperbolic tangent of x.