Next: Strings, Previous: General Syntax [Contents][Index]
Numbers are stored in double precision floating point format.
There’s no integer type. Whenever an integer argument is expected, the passed value is truncated.
Constant numbers consist in decimal digits and possibly a decimal dot. The dot may start the sequence; in this case the first digit is assumed to be a zero.
x + ySum of x and y.
x - yDifference of x and y.
x * yProduct of x and y.
x / yQuotient of x and y.
x ^ yx to the power y.
x mod yRemainder after division of x by y.
sqrt(x)Square root of x.
exp(x)Base-e exponential of x.
ln(x)Natural logarithm of x.
sin(x), cos(x), tan(x)Sine, cosine, tangent of x degrees.
asin(x), acos(x), atan(x)Arcsine, arccosine, arctangent of x (in degrees).
deg(x)Radians to degrees conversion.
rad(x)Degrees to radians conversion.
abs(x)Absolute value of x.
sign(x)-1 if x < 0, 0 if x = 0, 1 if x > 0.
ceil(x)Smallest integral value greater than or equal to x.
floor(x)Largest integral value less than or equal to x.
round(x)Integral value nearest to x.
min(x, y)Minimum of x and y.
max(x, y)Maximum of x and y.
clamp(x, y, z)y if x < y, z if x > z, x otherwise.
piArchimedes’ constant.
Next: Strings, Previous: General Syntax [Contents][Index]