Math
ABS
abs(Number x) -> Number
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
B_AND
b_and(Integer a, Integer b) -> Integer
STABLE
No description.
B_NOT
b_not(Integer a) -> Integer
STABLE
No description.
B_OR
b_or(Integer a, Integer b) -> Integer
STABLE
No description.
B_XOR
b_xor(Integer a, Integer b) -> Integer
STABLE
No description.
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 i, Integer j)->(Integer q, Integer r)
STABLE
Quotient q and remainder r when dividing i with j
EVEN
even(Integer i)
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
FMOD
fmod(Real x, Real y) -> Real
STABLE
The remainder when dividing real numbers x with y
FRAND
frand(Real low, Real high) -> Real
STABLE
Real random number in interval [low,high)
By default SA Engine is seeded using a cryptographically
secure seed. Either call rand_seed to override or
set environment variable SA_SKIP_RAND_SEED if you do not
wish the random functions to be seeded.
frand(Real high) -> Real
STABLE
Real random number in interval [0,high)
By default SA Engine is seeded using a cryptographically
secure seed. Either call rand_seed to override or
set environment variable SA_SKIP_RAND_SEED if you do not
wish the random functions to be seeded.
IDENTITY
identity(Object o) -> Object
STABLE
Identity function
IDIV
idiv(Integer i, Integer j) -> Integer q
STABLE
Integer division of i withj
INTEGER
integer(Number n) -> Integer i
STABLE
Truncate real number n to integer
INTEGER_NOT
integer_not(Vector of Integer v) -> Vector of Integer
STABLE
No description.
integer_not(Integer i) -> Integer
STABLE
No description.
ISFINITE
isfinite(Number x)
STABLE
Is x a proper number?
ISINTEGER
isinteger(Number x)
STABLE
Is x an integer?
LN
ln(Real x) -> Real
STABLE
Natural logarithm of x
LOG
log(Real x, Real b) -> Real
STABLE
Logarithm of x in base b
LOG10
log10(Real x) -> Real
STABLE
Logarithm of x in base 10
L_SHIFT
l_shift(Integer a, Integer b) -> Integer
STABLE
No description.
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(Integer i, Integer j) -> Integer k
STABLE
The remainder when dividing integers i with `j
NTOH16
ntoh16(Integer a) -> Integer
STABLE
No description.
NTOH32
ntoh32(Integer a) -> Integer
STABLE
No description.
NTOH64
ntoh64(Integer a) -> Integer r
STABLE
No description.
NUMBER
number(Object x) -> Number
STABLE
Cast x to number
ODD
odd(Integer i)
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 high) -> Integer
STABLE
Integer random number in interval [0,high)
By default SA Engine is seeded using a cryptographically
secure seed. Either call rand_seed to override or
set environment variable SA_SKIP_RAND_SEED if you do not
wish the random functions to be seeded.
rand(Integer low, Integer high) -> Integer
STABLE
Integer random number in interval [low,high)
By default SA Engine is seeded using a cryptographically
secure seed. Either call rand_seed to override or
set environment variable SA_SKIP_RAND_SEED if you do not
wish the random functions to be seeded.
RAND_SEED
rand_seed(Integer x) -> Integer
STABLE
New random seed
RANGE
range(Integer u) -> Bag of Integer
STABLE
Bag of integers from 1 up to and including u
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
Bag of integers from and including l up to and possibly including u
with step `s`
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
roundto(Real r, Integer d) -> Real
STABLE
Round number r to d decimals
R_SHIFT
r_shift(Integer a, Integer b) -> Integer
STABLE
No description.
SIGN
sign(Number x) -> Integer
STABLE
The signum of x
SIGNIF
signif(Real x, Integer d) -> Real
STABLE
Round x to d significant digits
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
