Using Intrinsic Functions in Expressions in RMxprt
RMxprt recognizes a set of intrinsic trigonometric and mathematical functions that can be used to define expressions. Intrinsic function names are reserved and may not be used as variable names.
The following intrinsic functions may be used to define expressions:
Function |
Description |
Syntax |
abs |
Absolute value (|x|) |
abs(x) |
sin |
Sine |
sin(x) |
cos |
Cosine |
cos(x) |
tan |
Tangent |
tan(x) |
asin |
Arcsine |
asin(x) |
acos |
Arccosine |
acos(x) |
atan |
Arc tangent. Takes a tangent value as an argument. Because there are two angles in a circle that can have the same tangent value, and atan can return only one value, it returns a value in the range between -90 degrees and +90 degrees (or between -pi/2 and pi/2 in radians). |
atan(x) |
atan2 |
A two-argument version of the atan function. Takes the y and x coordinates (including sign information) of a point as arguments and returns the angle from the X-axis. Can return angle values for the full circle (-180 degrees to +180 degrees or -pi to +pi in radians). |
atan2(y,x) |
asinh |
Hyperbolic Arcsine |
asinh(x) |
atanh |
Hyperbolic Arctangent |
atanh(x) |
sinh |
Hyperbolic Sine |
sinh(x) |
cosh |
Hyperbolic Cosine |
cosh(x) |
tanh |
Hyperbolic Tangent |
tanh(x) |
even |
Returns 1 if integer part of the number is even; returns 0 otherwise. |
even(x) |
odd |
Returns 1 if integer part of the number is odd; returns 0 otherwise. |
odd(x) |
sgn |
Sign extraction |
sgn(x) |
exp |
Exponential (ex) |
exp(x) |
pow |
Raise to power (xy) |
pow(x,y) |
if |
If |
if(cond_exp,true_exp, false_exp) |
pwl |
Piecewise Linear with linear extrapolation on x. (pwl can be used with datasets for Design Variables but not for Project variables). |
pwl(dataset_exp, variable) |
pwlx |
Piecewise Linear x with linear extrapolation on x |
pwlx(dataset_exp, variable) |
pwl_periodic |
Piecewise Linear with periodic extrapolation on x |
pwl_periodic(dataset_exp, variable) |
sqrt |
Square Root |
sqrt(x) |
ln |
Natural Logarithm (The "log" function has been discontinued. If you use "log(x)" in an expression, the software automatically changes it to "ln(x)".) |
ln(x) |
log10 |
Logarithm base 10 |
log10(x) |
int |
Truncated integer function |
int(x) |
nint |
Nearest integer |
nint(x) |
max |
Maximum value of two parameters |
max(x,y) |
min |
Minimum value of two parameters |
min(x,y) |
mod |
Modulus |
mod(x,y) |
rem |
Returns the fractional part of a decimal number such that rem(x) = x-int(x) |
rem(x) |
clp | Closest point interpolation. Note: If used with a large 3D dataset, clp function will degrade. | clp(datasetName, X,Y,Z) |