VSUBG ( Vector subtraction, general dimension )
SUBROUTINE VSUBG ( V1, V2, NDIM, VOUT )
Compute the difference between two double precision vectors of
arbitrary dimension.
None.
VECTOR
INTEGER NDIM
DOUBLE PRECISION V1 ( NDIM )
DOUBLE PRECISION V2 ( NDIM )
DOUBLE PRECISION VOUT ( NDIM )
VARIABLE I/O DESCRIPTION
  
V1 I First vector (minuend).
V2 I Second vector (subtrahend).
NDIM I Dimension of V1, V2, and VOUT.
VOUT O Difference vector, V1  V2.
V1 is a double precision vector of arbitrary dimension which
is the minuend (i.e. first or lefthand member) in the
vector subtraction.
V2 is a double precision vector of arbitrary dimension which
is the subtrahend (i.e. second or righthand member) in
the vector subtraction.
NDIM is the dimension of V1 and V2 (and VOUT).
VOUT is a double precision vector containing the difference
V1  V2.
None.
Error free.
None.
For each value of the index I from 1 to NDIM, this subroutine
performs the following subtraction:
VOUT(I) = V1(I)  V2(I)
No error checking is performed to guard against numeric overflow
or underflow.
The following table shows the results of VSUBG from various
inputs.
V1 V2 NDIM VOUT

(1, 2, 3, 4) ( 1, 1, 1, 1 ) 4 ( 0, 1, 2, 3 )
(1, 2, 3, 4) (1,2,3,4 ) 4 ( 2, 4, 6, 8 )
(1, 2, 3, 4) (1, 2,3, 4 ) 4 ( 2, 0, 6, 0 )
No error checking is performed to guard against numeric overflow.
The programmer is thus required to insure that the values in V1
and V2 are reasonable and will not cause overflow.
None.
W.M. Owen (JPL)
SPICELIB Version 1.0.3, 23APR2010 (NJB)
Header correction: assertions that the output
can overwrite the input have been removed.
SPICELIB Version 1.0.2, 10MAR1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 1.0.1, 9MAY1990 (HAN)
Several errors in the header documentation were corrected.
SPICELIB Version 1.0.0, 31JAN1990 (WMO)
