abs, acos, asin, atan, atan2, cbrt, ceil, cos, cosh, cube, exp, factorial, floor, log, log10, log2, logb, nroot, pow, random, round, sign, sin, sinh, sqr, sqrt, tan, tanh, trunc
+y = abs(+x)
Returns the absolute value of +x.
abs(3.7) == 3.7
abs(-3.7) == 3.7
abs(-infinity) == +infinity
+y = acos(+x)
Returns the arccosine of +x (which should be in the range -1 to 1 or the result will be undefined). The returned value is in the range 0 to PI.
Inverse: cos().
acos(0.0) == PI / 2
acos(0.73168886887382) == 0.75
acos(cos(0.6)) == 0.6
+y = asin(+x)
Returns the arcsine of +x (which should be in the range -1 to 1 or the result will be undefined). The returned value is in the range -PI / 2 to PI / 2.
Inverse: sin().
asin(0.0) == 0.0
asin(0.69613523862736) == 0.77
asin(sin(0.5)) == 0.5
+y = atan(+x)
Returns the arctangent of +x. The returned value is in the range -PI / 2 to PI / 2.
Inverse: tan().
atan(0.0) == 0.0
atan(0.93159645994407) == 0.75
atan(tan(0.5)) == 0.5
+z = atan2(+y, +x)
Returns the arctangent of +y/+x with proper handling of quadrants. The returned value is in the range -PI to PI.
atan2(0.0, 1.0) == 0.0
atan2(1.0, 0.0) == PI / 2
atan2(sin(0.5), cos(0.5)) == 0.5
+y = cbrt(+x)
Returns the cube root of +x.
Inverse: cube(+y).
cbrt(0.0) == 0.0
cbrt(0.421875) == 0.75
cbrt(cube(-0.7)) == -0.7
+y = ceil(+x)
Returns the ceiling of value +x. Ceil() rounds both positive and negative values upwards.
ceil(0.0) == 0.0
ceil(-0.99999) == 0.0
ceil(1000.00001) == 1001.0
+y = cos(+x)
Returns the cosine of +x. The returned value is in the range -1 to 1.
Inverse: acos().
cos(0.0) == 1.0
cos(0.72273424781342) == 0.75
cos(acos(0.5)) == 0.5
+y = cosh(+x)
Returns the hyperbolic cosine of +x.
cosh(0.0) == 1.0
cosh(0.9624236501192069) == 1.5
+y = cube(+x)
Returns the cube of +x.
Inverse: cbrt(+y).
cube(0.0) == 0.0
cube(0.90856029641607) == 0.75
cube(cbrt(-0.7)) == -0.7
+y = exp(+x)
Returns the exponential of +x. I.e, the result is e to the power +x.
Inverse: log().
exp(0.0) == 1.0
exp(1.0) == 2.718281828459
exp(-0.28768207245178) == 0.75
exp(log(0.6)) == 0.6
+y = factorial(+x)
Returns the factorial of value +x. +x should be an integer in the range of 1 to 170.
factorial(10) == 3628800
+y = floor(+x)
Returns the floor of value +x. Floor() rounds both positive and negative values downwards.
floor(0.0) == 0.0
floor(-0.99999) == -1.0
floor(1000.00001) == 1000.0
+y = log(+x)
Returns the natural logarithm of +x (i.e. the logarithm with base e). +x should be positive or the result will be undefined.
Inverse: exp().
log(0.0) == -infinity
log(1.0) == 0.0
log(2.7182818284591) == 1.0
log(exp(0.6)) == 0.6
+y = log10(+x)
Returns the base-10 logarithm of +x. +x should be positive or the result will be undefined.
Inverse: pow(10, +y).
log10(0.0) == -infinity
log10(1.0) == 0.0
log10(10000.0) == 4.0
log10(pow(10, 0.6)) == 0.6
+y = log2(+x)
Returns the base-2 logarithm of +x. +x should be positive or the result will be undefined.
Inverse: pow(2, +y).
log2(0.0) == -infinity
log2(1.0) == 0.0
log2(65536.0) == 16.0
log2(pow(2, 1.3)) == 1.3
+y = logb(+b, +x)
Returns the logarithm of +x with base +b. +x should be positive or the result will be undefined. Equivalent to log(+x) / log(+b).
Inverses: +x = pow(+b, +y), +b = nroot(+y, +x).
logb(20, 1.0) == 0.0
logb(20, 8000) == 3
+x = nroot(+y, +z)
Returns the nth (+y) root of +z.
Inverse: +z = pow(+x, +y).
nroot(11, pow(17, 11)) == 17
+z = pow(+x, +y)
Returns +x raised to the power of +y.
Inverses: +y = log(+z) / log(+x) or logb(+x, +z), +x = pow(+z, 1.0 / +y) or nroot(+y, +z).
pow(0.0, 0.0) == 1.0
pow(10.0, 4.0) == 10000.0
pow(10.0, log10(0.8)) == 0.8
pow(pow(2.8, 9.8), 1.0 / 9.8) == 2.8
+y = random(+x)
Returns a pseudo-random number between 0 and +x.
random(100.0)
+y = round(+x)
Rounds the value of +x to the nearest integer. If the decimal part of +x is exactly 0.5, the rounding will be upwards (e.g. -3.5 rounds to 3.0).
round(1.23456) == 1
round(-1.6789) == -2
round(3.5) == 4.0
round(-3.5) == -3.0
round(1000.499999) == 1000.0
+y = sign(+x)
Returns -1 if +x is negative, +1 if +x is positive or 0 if +x is zero.
sign(0.0) == 0.0
sign(12.34) == 1
sign(-infinity) == -1
+y = sin(+x)
Returns the sine of +x. The returned value is in the range -1 to 1.
Inverse: asin().
sin(0.0) == 0.0
sin(0.84806207898148) == 0.75
sin(asin(0.5)) == 0.5
+y = sinh(+x)
Returns the hyperbolic sine of +x.
sinh(0.0) == 0.0
sinh(0.61958958372348) == 0.66
+y = sqr(+x)
Returns the square of +x.
Inverse: sqrt(+y).
sqr(0.0) == 0.0
sqr(0.86602540378444) == 0.75
sqr(sqrt(0.75)) == 0.75
+y = sqrt(+x)
Returns the square root of +x. +x should be positive or the result will be undefined.
Inverse: sqr(+y).
sqrt(0.0) == 0.0
sqrt(0.5625) == 0.75
sqrt(sqr(0.7)) == 0.7
+y = tan(+x)
Returns the tangent of +x.
Inverse: atan(+y).
tan(0.0) == 0.0
tan(0.603982978253) == 0.69
tan(atan(0.3)) == 0.3
+y = tanh(+x)
Returns the hyperbolic tangent of +x.
tanh(0.0) == 0.0
tanh(0.9729550745276566) == 0.75
+y = trunc(+x, [+n = 0])
Truncates the value of +x leaving up to +n decimal places intact. If +n is omitted, all decimals are truncated. Truncation rounds positive values downwards and negative values upwards.
trunc(1.23456) == 1
trunc(-1.23456) == -1
trunc(1.23456, 2) == 1.23
trunc(1.5, 10) == 1.5