In the statements of the DIRA2 query language one can use the arithmetic operators and functions to work with numerical and logical variables and constants.
The Arithmetic operators, in order of evaluation are:
One can alter the order of evaluation of an expression using the parentheses " ( " and " ) ". There is no limit to the number of balanced parentheses used in a expression.
The following functions can be used in expression:
These functions are applied to numerical fields and are well known standard functions. Some of these are specific functions written to simplify the work with the astronomical catalogues. The functions RADC and DEGC must have as argument a sky coordinate written in one of the DIRA2 formats; they return the coordinate in radians and in degrees respectively. The NULL function is true (value = -1) when the field, used as argument, does not contain a numerical value. If one need to retrieve all the records that have an undefined value in a field (eg. MAG) one can use the expression: NULL(MAG) in his statement. One can call nested functions as : LOG(ABS(var)).
For example, to evaluate the sine of the declination coordinate (DEC) you can write the function:
SIN( RADC( DEC ) )