Index Page vaddg_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 vaddg_c ( ConstSpiceDouble  * v1,
                      ConstSpiceDouble  * v2,
                      SpiceInt            ndim,
                      SpiceDouble       * vout )

#### Abstract

        Add two vectors of arbitrary dimension.

#### Required_Reading

       None.

#### Keywords

        VECTOR

#### Brief_I/O

        VARIABLE  I/O  DESCRIPTION
        --------  ---  --------------------------------------------------
         v1        I     First vector to be added.
         v2        I     Second vector to be added.
         ndim      I     Dimension of v1, v2, and vout.
         vout      O     Sum vector, v1 + v2.
                         vout can overwrite either v1 or v2.

#### Detailed_Input

        v1      This may be any double precision vector of arbitrary
                dimension.

        v2      Likewise.

        ndim    the dimension of v1, v2 and vout.

#### Detailed_Output

        vout   This is vector sum of v1 and v2. vout may overwrite either
               v1 or v2.

#### Parameters

       None.

#### Exceptions

        Error free.

#### Files

        None.

#### Particulars

        This routine simply performs addition 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 vaddg_c.

        v1                  v2                  ndim   vout
        -----------------------------------------------------------------
        [1.0, 2.0, 3.0]     [4.0, 5.0, 6.0]     3      [5.0,  7.0, 9.0]
        [1e-7,1e23]         [1e24, 1e23]        2      [1e24, 2e23]

#### 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.

#### Literature_References

        None.

#### Author_and_Institution

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

#### Version

       -CSPICE Version 1.0.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, 2e23].

       -CSPICE Version 1.0.0, 29-JUN-1999

#### Index_Entries

       n-dimensional vector addition

#### Link to routine vaddg_c source file vaddg_c.c

    Wed Apr  5 17:54:46 2017