Index Page
vsub_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   void vsub_c ( ConstSpiceDouble   v1[3],
                 ConstSpiceDouble   v2[3],
                 SpiceDouble        vout[3] ) 

Abstract

 
   Compute the difference between two 3-dimensional, double 
   precision vectors. 
 

Required_Reading

 
   None. 
 

Keywords

 
   VECTOR 
 

Brief_I/O

 
   VARIABLE  I/O  DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   v1         I     First vector (minuend). 
   v2         I     Second vector (subtrahend). 
   vout       O     Difference vector, v1 - v2. vout can overwrite 
                    either v1 or v2. 
 

Detailed_Input

 
   v1    This can be any 3-dimensional, double precision vector. 
 
   v2    Ditto. 
 

Detailed_Output

 
   vout   This is a 3-dimensional, double precision vector which 
           represents the vector difference, v1 - v2. 
 

Parameters

 
   None. 
 

Exceptions

 
   Error free. 
 

Files

 
   None. 
 

Particulars

 
   This routine simply performs subtraction between components of v1 
   and v2.  No checking is performed to determine whether floating 
   point overflow has occurred. 
 

Examples

 
   The following table shows the output vout as a function of the 
   the input v1 and v2 from the subroutine vsub_c. 
 
   v1                  v2              ---> vout 
   --------------      --------------       -------------- 
   [1.0 , 2.0, 3.0]    [4.0 , 5.0 , 6.0]    [-3.0 , -3.0, -3.0] 
   [1e-7,1e23, 0.0]    [1e24, 1e23, 0.0]    [-1e24,  0.0,  0.0]
 

Restrictions

 
   The user is required to determine that the magnitude each 
   component of the vectors is within the appropriate range so as 
   not to cause floating point overflow.  No error recovery or 
   reporting scheme is incorporated in this subroutine. 
 

Literature_References

 
   None. 
 

Author_and_Institution

 
   W.M. Owen       (JPL) 
   E.D. Wright     (JPL)
 

Version

    -CSPICE Version 1.1.1, 07-NOV-2003 (EDW)

      Corrected a mistake in the second example's value
      for VOUT, i.e. replaced [1D24, 2D23, 0.0] with
      [-1e24, 0.0, 0.0].

   -CSPICE Version 1.1.0, 22-OCT-1998 (NJB)

      Made input vectors const.

   -CSPICE Version 1.0.0, 08-FEB-1998 (EDW)

Index_Entries

 
   3-dimensional vector subtraction 
 

Link to routine vsub_c source file vsub_c.c

Wed Apr  5 17:54:47 2017