Skip to main content

Math

ABS

abs(Number x) -> Number y
STABLE

Absolute value of x


abs(Real x) -> Real y
STABLE

Absolute value of x


abs(Integer x) -> Integer y
STABLE

Absolute value of x


ACOS

acos(Real x) -> Real
STABLE

Inverse cosine radians of x


ASIN

asin(Real x) -> Real
STABLE

Inverse sine radians of x


ATAN

atan(Real x) -> Real
STABLE

Inverse tangent radians of x


ATAN2

atan2(Real y, Real x) -> Real
STABLE

The angle in radians between the positive x-axis of a plane and

the point given by the coordinates (x, y) on it


CEILING

ceiling(Number x) -> Integer y
STABLE

The closest integer y >= x


COS

cos(Real x) -> Real
STABLE

Cosine of x radians


DIV

div(Number x, Number y) -> Real z
STABLE

Divide number x with y, x / y


DIVIDE

divide(Integer x, Integer y)->(Integer q, Integer r)
STABLE

Quotient q and remainder r when dividing x with y


EVEN

even(Number i) -> Boolean
STABLE

True if i is even integer


EXP

exp(Real x) -> Real
STABLE

Natural exponent e^x


FLOOR

floor(Number x) -> Integer y
STABLE

The closest integer y <= x


FRAND

frand(Real high) -> Real
STABLE

Real random number in interval [0,high)


frand(Real low, Real high) -> Real
STABLE

Real random number in interval [low,high)


INTEGER

integer(Number n) -> Integer i
STABLE

Truncate real number n to integer


ISFINITE

isfinite(Number x) -> Boolean
STABLE

Is x a proper number?


ISINTEGER

isinteger(Number x) -> Boolean
STABLE

Is x an integer?


LN

ln(Real x) -> Real
STABLE

Natural logarithm of x


LOG10

log10(Real x) -> Real
STABLE

The base 10 logarithm of x


MAX

max(Object x, Object y) -> Object
STABLE

The largest of objects x and y


MIN

min(Object x, Object y) -> Object
STABLE

The smallest of objects x and y


MINUS

minus(Number x, Number y) -> Number z
STABLE

Subtract y from x, x-y


MOD

mod(Number x, Number y) -> Number
STABLE

Remainder when dividing x with y


NOT

not(Vector of Integer v) -> Vector of Integer
STABLE

No description.


not(Integer i) -> Integer
STABLE

No description.


NUMBER

number(Object x) -> Number
STABLE

Cast x to number


ODD

odd(Number i) -> Boolean
STABLE

True if i is odd integer


PI

pi( ) -> Real
STABLE

The constant PI


PLUS

plus(Number x, Number y) -> Number r
STABLE

Add x and y, x + y


POWER

power(Real base, Real power) -> Real
STABLE

base^power and its inverse


RAND

rand(Integer low, Integer high) -> Integer
STABLE

Integer random number in interval [low,high)


rand(Integer high) -> Integer
STABLE

Integer random number in interval [0,high)


RAND_SEED

rand_seed(Integer x) -> Integer
STABLE

New random seed


RANGE

range(Integer l, Integer u) -> Bag of Integer
STABLE

Bag of integers from and including l up to and including u


range(Integer l, Integer u, Integer s) -> Bag of Integer
STABLE

Array of integers from and including l up to and possibly including u

with step s


range(Integer u) -> Bag of Integer
STABLE

Bag of integers from 1 up to and including u


REAL

real(Number n) -> Real
STABLE

Make a real number of n


ROUND

round(Number x) -> Integer
STABLE

Round x to nearest integer


ROUNDTO

roundto(Object o, Integer digits) -> Literal
STABLE

Round numeric values in o to digits significant decimals


SIGN

sign(Number x) -> Integer
STABLE

The signum of x


SIN

sin(Real x) -> Real
STABLE

Sine of x radians


SQRT

sqrt(Real x) -> Real r
STABLE

The positive square root of x


TAN

tan(Real x) -> Real
STABLE

Tangent of x radians


TIMES

times(Number x, Number y) -> Number z
STABLE

Multiply x with y, x * y


UMINUS

uminus(Number x) -> Number
STABLE

Unary minus -x