1
//--------------------------------------------------------------------------
8
// CSIRO Marine Research
10
// Purpose: NaN definition
12
// Description: Should cover machines with 64 bit doubles or other machines
17
//--------------------------------------------------------------------------
19
#if !defined ( _NAN_H )
22
#if ( defined ( __GNUC__ ) && !defined ( __ICC ) ) || defined ( __BORLANDC__ )
24
static const double NaN = 0.0 / 0.0;
28
#define copysign _copysign
31
#elif defined ( WIN32 )
33
#if !defined ( _MSC_VER )
35
static unsigned _int64 lNaN = ( (unsigned _int64) 1 << 63 ) - 1;
37
#define NaN ( *(double *) &lNaN )
41
// MSVC/C++ 6.0 reports a version 1200,
42
// MSVC/C++ 2003 reports a version 1300
50
#define NaN _Nan._Double
54
#define copysign _copysign
60
static const long long lNaN = ( (unsigned long long) 1 << 63 ) - 1;
62
#define NaN ( *(double *) &lNaN )
69
//#if !defined(_NAN_H)
72
// #if defined(__GNUC__)
73
// static const double NaN = 0.0 / 0.0;
74
// #elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN)
75
// static const long long lNaN = 0x7fffffffffffffff;
77
// #define NaN (*(double*)&lNaN)
79
// static const long long lNaN = 0xfff8000000000000;
81
// #define NaN (*(double*)&lNaN)