Arithmetic and mathematical operations may be performed on numbers stored using any numerical data type by invoking appropriate NUM_ functions, using statements such as:
RESULT = NUM_FUNC
T
( ARG )or RESULT = NUM_FUNC
T
( ARG1, ARG2 )
Here, the NUM_ function takes an argument (or arguments) of type
T
and returns a result which is also of type
T
,
having performed the arithmetic or mathematical operation specified by
FUNC
.
The data type code
T
may be any of those specified in
Table
and
FUNC
may be any of the function
codes specified in Tables
&
.
The number of function arguments (1 or 2) appropriate to each function is
also indicated in these latter Tables.
Thus, for example, the function NUM_ADDUW adds two unsigned word
arguments to produce an unsigned word result, while NUM_SQRTD
evaluates the square root of a double precision argument, returning a double
precision result.
PRIMDAT --- Processing of Primitive Numerical Data