XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


selectlib (selectlib-4.77) [xmmsas_20230412_1735-21.0.0]


Arithmetic operators and functions

Boolean and arithmetic expression can contain arithmetic sub-expressions consisting of operators, functions and constants. The following operators and functions are available:

description symbol/name
arithmetic negation -
addition/subtraction +/-
multiplication/division *//
modulus %
exponentiation **, pow(x, y)
absolute value abs(x)
sine/cosine/tangent sin(x)/cos(x)/tan(x)
arc sine/arc cosine arcsin(x)/arccos(x)
arc tan arctan(x)/arctan2(x, y) = arctan(x/y)
hyperbolic sine/cosine/tangent sinh(x)/cosh(x)/tanh(x)
exponential exp(x)
natural log log(x)
common log log10(x)
square root sqrt(x)
integral part int(x)
fractional part modf(x)
smallest integral value not less than $x$ ceil(x)
largest integral value not greater than $x$ floor(x)
floating point remainder of $x/y$ fmod(x, y)
The argument of the trigonometric functions and the result of their respective inverses are angles in units of radians. For required conversions between radians and decimal degrees please avail the symbolic constants #RAD and #DEG. Example: sin(ANGLE*#RAD), #DEG*arcsin(VAL).

XMM-Newton SOC -- 2023-04-16