/[escript]/trunk/paso/src/Common.h
ViewVC logotype

Diff of /trunk/paso/src/Common.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2878 by gross, Tue Nov 17 07:32:59 2009 UTC revision 2879 by jfenwick, Thu Jan 28 01:00:26 2010 UTC
# Line 64  typedef int err_t; Line 64  typedef int err_t;
64  #define EPSILON DBL_EPSILON  #define EPSILON DBL_EPSILON
65  #define LARGE_POSITIVE_FLOAT DBL_MAX  #define LARGE_POSITIVE_FLOAT DBL_MAX
66  #define SMALL_NEGATIVE_FLOAT -DBL_MAX  #define SMALL_NEGATIVE_FLOAT -DBL_MAX
67  #ifndef NAN  /*#ifndef NAN
68     #define NAN (0.0/0.0)     #define NAN (0.0/0.0)
69  #endif  #endif
70  #define IS_NAN(__VAL__)  ( (__VAL__) == NAN )  /* this does not work */  */
71    /*#define IS_NAN(__VAL__)  ( (__VAL__) == NAN )*/  /* this does not work */
72  /* #define IS_NAN(__VAL__)  ( ! ( ( (__VAL__) >= 0. ) ||  ( (__VAL__) <= 0. ) ) )  this does not work */  /* #define IS_NAN(__VAL__)  ( ! ( ( (__VAL__) >= 0. ) ||  ( (__VAL__) <= 0. ) ) )  this does not work */
73    
74    #ifdef isnan
75      #define IS_NAN(__VAL__) (isnan(__VAL__))
76    #else
77    /* If we do not have isnan then we can't reliably check for NaN - return false */
78      #define IS_NAN(__VAL__) (0)
79    #endif
80    
81  /**************************************************************/  /**************************************************************/
82    
83  /*   some useful functions: */  /*   some useful functions: */

Legend:
Removed from v.2878  
changed lines
  Added in v.2879

  ViewVC Help
Powered by ViewVC 1.1.26