Author(s): H. Lipps | Library: KERNLIB |
Submitter: | Submitted: 18.12.1979 |
Language: Fortran or Assembler or COMPASS | Revised: 27.05.1987 |
These subprograms perform elementary vector operations.
Structure:
SUBROUTINE and FUNCTION subprograms
User Entry Names:
RVADD, | RVCPY, | RVDIV, | RVMPA, | RVMPY, | RVMUL, | RVMULA, | RVMUNA, |
RVRAN, | RVSCA, | RVSCL, | RVSCS, | RVSET, | RVSUB, | RVSUM, | RVXCH, |
DVADD, | DVCPY, | DVDIV, | DVMPA, | DVMPY, | DVMUL, | DVMULA, | DVMUNA, |
DVRAN, | DVSCA, | DVSCL, | DVSCS, | DVSET, | DVSUB, | DVSUM, | DVXCH, |
CVADD, | CVCPY, | CVDIV, | CVMPA, | CVMPY, | CVMUL, | CVMULA, | CVMUNA, |
CVRAN, | CVSCA, | CVSCL, | CVSCS, | CVSET, | CVSUB, | CVSUM, | CVXCH, |
CVMPYC, | CVMPAC |
Usage:
For (type REAL), (type DOUBLE PRECISION), (type COMPLEX):
CALL tVSET (N,S,Z1,Z2) | ||
CALL tVRAN (N,A,B,Z1,Z2) | random (see Note 2) | |
CALL tVCPY (N,X1,X2,Z1,Z2) | ||
CALL tVXCH (N,X1,X2,Y1,Y2) | interchanges with | |
CALL tVADD (N,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVSUB (N,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVMUL (N,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVMULA(N,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVMUNA(N,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVDIV (N,X1,X2,Y1,Y2,Z1,Z2,IFAIL) | (see Note 3) | |
CALL tVSCL (N,S,X1,X2,Z1,Z2) | ||
CALL tVSCA (N,S,X1,X2,Y1,Y2,Z1,Z2) | ||
CALL tVSCS (N,S,X1,X2,Y1,Y2,Z1,Z2) | ||
F = tVSUM (N,X1,X2) | ||
F = tVMPY (N,X1,X2,Y1,Y2) | ||
F = tVMPA (N,X1,X2,Y1,Y2,S) | ||
F = CVMPYC(N,X1,X2,Y1,Y2) | ||
F = CVMPAC(N,X1,X2,Y1,Y2,S) |
Restrictions:
If vector overlaps with vector or , results will be correct provided each element coincides with an element or , where k<j.
Accuracy:
On computers with IBM 370 architecture, RVMPY, RVMPA, CVMPY and CVMPA accumulate the inner product using double-precision arithmetic internally; the final result is then rounded to single precision.
Notes: