vnorm_c

 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

```   SpiceDouble vnorm_c ( ConstSpiceDouble v1 )

```

#### Abstract

```   Compute the magnitude of a double precision, 3-dimensional vector.
```

```   None.
```

```
VECTOR

```

#### Brief_I/O

```   VARIABLE  I/O  DESCRIPTION
--------  ---  --------------------------------------------------
v1         I   Vector whose magnitude is to be found.

The function returns the norm of v1.
```

#### Detailed_Input

```   v1             may be any 3-dimensional, double precision vector.
```

#### Detailed_Output

```   The function returns the magnitude of v1 calculated in a numerically
stable way.
```

#### Parameters

```   None.
```

#### Exceptions

```   Error free.
```

#### Files

```   None.
```

#### Particulars

```   vnorm_c takes care to avoid overflow while computing the norm of the
input vector v1.  vnorm_c finds the component of v1 whose magnitude
is the largest.  Calling this magnitude v1max, the norm is computed
using the formula

vnorm_c  =  v1max *  ||  (1/v1max) * v1  ||

where the notation ||x|| indicates the norm of the vector x.
```

#### Examples

```   The following table show the correlation between various input
vectors v1 and vnorm_c:

v1                                    vnorm_c
-----------------------------------------------------------------
( 1.e0,    2.e0,   2.e0    )          3.e0
( 5.e0,    12.e0,  0.e0    )          13.e0
( -5.e-17, 0.0e0,  12.e-17 )          13.e-17
```

#### Restrictions

```   None.
```

#### Literature_References

```   None.
```

#### Author_and_Institution

```   N.J. Bachman       (JPL)
W.L. Taber         (JPL)
W.M. Owen          (JPL)
```

#### Version

```   -CSPICE Version 1.0.2, 16-JAN-2008   (EDW)

Detailed Input to Detailed_Input
Detailed Output to Detailed_Output

-CSPICE Version 1.0.1, 12-NOV-2006 (EDW)

```   norm of 3-dimensional vector
`Wed Apr  5 17:54:47 2017`