Janet 1.12.2-b91fe8b Documentation
(Other Versions:
1.11.1
1.10.1
1.9.1
1.8.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
)
Math Module
Index
math/-inf math/abs math/acos math/acosh math/asin math/asinh math/atan math/atan2 math/atanh math/cbrt math/ceil math/cos math/cosh math/e math/erf math/erfc math/exp math/exp2 math/expm1 math/floor math/gamma math/hypot math/inf math/int-max math/int-min math/int32-max math/int32-min math/log math/log10 math/log1p math/log2 math/nan math/next math/pi math/pow math/random math/rng math/rng-buffer math/rng-int math/rng-uniform math/round math/seedrandom math/sin math/sinh math/sqrt math/tan math/tanh math/trunc
math/atan2 cfunction
(math/atan2 y x) Return the arctangent of y/x. Works even when x is 0.Community Examples
math/ceil cfunction
(math/ceil x) Returns the smallest integer value number that is not less than x.Community Examples
math/floor cfunction
(math/floor x) Returns the largest integer value number that is not greater than x.Community Examples
math/hypot cfunction
(math/hypot a b) Returns the c from the equation c^2 = a^2 + b^2Community Examples
math/int-max number
The minimum contiguous integer represtenable by a double (-(2^53))Community Examples
math/int-min number
The maximum contiguous integer representable by a double (2^53)Community Examples
math/int32-max number
The minimum contiguous integer represtenable by a 32 bit signed integerCommunity Examples
math/int32-min number
The maximum contiguous integer representable by a 32 bit signed integerCommunity Examples
math/log1p cfunction
(math/log1p x) Returns (log base e of x) + 1 more accurately than (+ (math/log x) 1)Community Examples
math/next cfunction
(math/next x y) Returns the next representable floating point value after x in the direction of y.Community Examples
math/random cfunction
(math/random) Returns a uniformly distributed random number between 0 and 1.Community Examples
math/rng cfunction
(math/rng &opt seed) Creates a Psuedo-Random number generator, with an optional seed. The seed should be an unsigned 32 bit integer or a buffer. Do not use this for cryptography. Returns a core/rng abstract type.Community Examples
math/rng-buffer cfunction
(math/rng-buffer rng n &opt buf) Get n random bytes and put them in a buffer. Creates a new buffer if no buffer is provided, otherwise appends to the given buffer. Returns the buffer.Community Examples
math/rng-int cfunction
(math/rng-int rng &opt max) Extract a random random integer in the range [0, max] from the RNG. If no max is given, the default is 2^31 - 1.Community Examples
math/rng-uniform cfunction
(math/rng-seed rng seed) Extract a random number in the range [0, 1) from the RNG.Community Examples
math/seedrandom cfunction
(math/seedrandom seed) Set the seed for the random number generator. seed should be an integer or a buffer.Community Examples
math/trunc cfunction
(math/trunc x) Returns the integer between x and 0 nearest to x.Community Examples