Mathematical operations
Functions
int - integer part of a number
round - the nearest integer number
abs - absolute value
sign - get the sign of a number
max - maximum value
mean - mean value
min - minimum value
stdev - standard deviation value
sum, operator + - sum
difference, operator - - difference
product, operator * - product
quotient, operator / - quotient
modulo, remainder, operator % - remainder
sqrt - square root
power, operator ^ - power
exp - exponent function
log - logarithm
sin, cos, tan - trigonometric function of an angle in degrees
radsin, radcos, radtan - trigonometric function of an angle in radians
+= -= *= /= - "in place" arithmetic operations
Logical operations
< <= > >= = <> - comparison operators
and, && - conjunction
or, || - disjunction
not, ! - negation
xor - exclusive disjunction
Bitwise operations
bitand, & - bitwise AND
bitor, | - bitwise OR
bitxor - bitwise XOR
bitnot - bitwise NOT
lshift - logical shift to the left
|= &= - "in place" bitwise operations
Random numbers
random - random integer number
runif - random number from an uniform distribution
rnorm - random number from a normal distribution
pick - random item or character
rerandom - initialize the random number generator
histogram - calculate histogram
Queries
validnump, validnum? - is this a valid number?
nanp, nan? - is this an undefined number?
infp, inf? - is this an infinity?
posinfp, posinf? - is this a positive infinity?
neginfp, neginf? - is this a negative infinity?
numberp, number? - is this a number?
See also:
:= (assignment)
, (indexing)
Table of Content