Changeset 20383


Ignore:
Timestamp:
03/30/16 14:01:50 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: NAN and INFINITY seem to be defined now for Windows, let's keep them in a ifndef for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Numerics/constants.h

    r14916 r20383  
    2323#ifdef _INTEL_WIN_
    2424
    25 /*Complicated way, which does not handle INFINITY though: */
    26 /*#ifndef NAN
    27         static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
    28         #define NAN (*(const float *) __nan)
    29 #endif*/
    30 
     25#ifndef NAN
    3126//For reference, for Intel compile on win64
    3227//#define NAN 0.0/0.0
    33 //#define INFINITY 1.0/0.0
    34 
    35 //Most generic way it would seem:
    36 #define INFINITY (DBL_MAX+DBL_MAX)
    3728#define NAN (INFINITY-INFINITY)
    38 
    3929#endif
    4030
    41 #endif //ifndef _ISSMTYPEDEFS_H_
     31#ifndef INFINITY
     32//For reference, for Intel compile on win64
     33//#define INFINITY 1.0/0.0
     34#define INFINITY (DBL_MAX+DBL_MAX)
     35#endif
     36
     37#endif /*_INTEL_WIN_*/
     38
     39#endif /*_ISSM_CONSTANTS_H_*/
Note: See TracChangeset for help on using the changeset viewer.