dpmax_c

Index Page dpmax_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
       SpiceDouble dpmax_c ()
#### Abstract
       Return the value of the largest (positive) number representable
       in a double precision variable.
#### Required_Reading
       None.
#### Keywords
       CONSTANTS
#### Brief_I/O
       The function returns the value of the largest (positive) number
       that can be represented in a double precision variable.
#### Detailed_Input
       None.
#### Detailed_Output
       The function returns the value of the largest (positive) number
       that can be represented in a double precision variable.

       This value varies from machine to machine.  The value is defined by
       the macro DBL_MAX from the ANSI standard header file float.h.
       According to the ANSI standard, DBL_MAX must be at least

          1.E+37
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       The function always returns a constant value, set by the user
       prior to compilation.
#### Examples
       The following code fragments illustrate the use of dpmax_c.
       Note in the second example that the smallest negative number
       is not necessarily the negative of the largest positive number.

       1) Set a range variable for a star or ephemeris object.

          /.
          Compute the distance to each object. For stars, use
          a "very large" distance.
          ./

          for ( i = 0;  i < n;  i++ )
          {
             if (  strcmp ( type[i], "star" )  )
             {
                /.
                The object is not a star.
                ./

                range[i] = vnorm_c ( state[i] );
             }
             else
             {
                range[i] = sqrt ( dpmax_c() ) / 2.;
             }
          }

       2) Initialize a CSPICE "window."

          /.
          The window originally has one interval, from "minus
          infinity" to "plus infinity".
          ./

          winsiz    =  2;
          window[0] =  dpmin_c();
          window[1] =  dpmax_c() ;

          scardd_ ( &winsiz, window );
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman    (JPL)
       H.A. Neilan     (JPL)
       M.J. Spencer    (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)
#### Version
       -CSPICE Version 1.1.0, 23-JUL-2001 (NJB)

          Removed tab characters from source file.

       -CSPICE Version 1.0.0, 16-OCT-1998 (NJB)
#### Index_Entries
       largest d.p. number
#### Link to routine dpmax_c source file dpmax_c.c

    Thu Apr 16 08:57:45 2009