- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
The
routine subtracts a constant from each element of a vectorised array to produce a new
array. Bad value checking is performed if required.
Invocation
CALL KPG1_CSUBx( BAD,
EL, A, CONST, B, NERR, STATUS )
Arguments
BAD = LOGICAL (Given)
Whether
to check for bad values in the input array.
EL = INTEGER (Given)
Number of array
elements to process.
A( EL ) = ? (Given)
Input array.
CONST = DOUBLE PRECISION
(Given)
Constant to be subtracted from each array element.
B( EL ) = ? (Returned)
Output
array.
NERR = INTEGER (Returned)
Number of numerical errors which occurred while
processing the array.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
-
There is a routine for each numeric data type: replace "
x"
in the routine name by D, R, I, W,
UW, B or UB as appropriate. The arrays supplied to the routine must have the data type
specified.
-
This routine will handle numerical errors (i.e. overflow) by assigning the appropriate "
bad"
value to
affected output array elements. If the constant supplied cannot be converted to the data type of the
arrays without overflow, then all elements of the output array will be assigned this bad value and
NERR will return the value of EL.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑