Single argument operators
Use these as operators without parenthesis (e.g. sin x) or as functions with one argument (e.g. sin(x)).
Operator |
Description |
-x |
Negation |
+x |
Unary plus. This converts it's operand to a number, but has no other effect. |
x! |
Factorial (x * (x-1) * (x-2) * … * 2 * 1). gamma(x + 1) for non-integers. |
abs x |
Absolute value (magnitude) of x |
acos x |
Arc cosine of x (in radians) |
acosh x |
Hyperbolic arc cosine of x (in radians) |
asin x |
Arc sine of x (in radians) |
asinh x |
Hyperbolic arc sine of x (in radians) |
atan x |
Arc tangent of x (in radians) |
atanh x |
Hyperbolic arc tangent of x (in radians) |
cbrt x |
Cube root of x |
ceil x |
Ceiling of x — the smallest integer that’s >= x |
cos x |
Cosine of x (x is in radians) |
cosh x |
Hyperbolic cosine of x (x is in radians) |
exp x |
e^x (exponential/antilogarithm function with base e) |
expm1 x |
e^x - 1 |
floor x |
Floor of x — the largest integer that’s <= x |
length x |
String or array length of x |
ln x |
Natural logarithm of x |
log x |
Natural logarithm of x (synonym for ln, not base-10) |
log10 x |
Base-10 logarithm of x |
log2 x |
Base-2 logarithm of x |
log1p x |
Natural logarithm of (1 + x) |
not x |
Logical NOT operator |
round x |
X, rounded to the nearest integer, using "grade-school rounding" |
sign x |
Sign of x (-1, 0, or 1 for negative, zero, or positive respectively) |
sin x |
Sine of x (x is in radians) |
sinh x |
Hyperbolic sine of x (x is in radians) |
sqrt x |
Square root of x. Result is NaN (Not a Number) if x is negative. |
tan x |
Tangent of x (x is in radians) |
tanh x |
Hyperbolic tangent of x (x is in radians) |
trunc x |
Integral part of a X, looks like floor(x) unless for negative number |
Copyright 2023 - BeriSoft Inc.
All rights reserved