Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #if !defined ( _NAN_H )
00020 #define _NAN_H
00021
00022 #if ( defined ( __GNUC__ ) && !defined ( __ICC ) ) || defined ( __BORLANDC__ )
00023
00024 static const double NaN = 0.0 / 0.0;
00025
00026 #ifdef __BORLANDC__
00027 #define isnan _isnan
00028 #define copysign _copysign
00029 #endif
00030
00031 #elif defined ( WIN32 )
00032
00033 #if !defined ( _MSC_VER )
00034
00035 static unsigned _int64 lNaN = ( (unsigned _int64) 1 << 63 ) - 1;
00036
00037 #define NaN ( *(double *) &lNaN )
00038
00039 #else
00040
00041
00042
00043
00044 #include <float.h>
00045 #include <ymath.h>
00046 #undef NaN
00047 #if _MSC_VER < 1300
00048 #define NaN _Nan._D
00049 #else
00050 #define NaN _Nan._Double
00051 #endif
00052
00053 #define isnan _isnan
00054 #define copysign _copysign
00055
00056 #endif
00057
00058 #else
00059
00060 static const long long lNaN = ( (unsigned long long) 1 << 63 ) - 1;
00061
00062 #define NaN ( *(double *) &lNaN )
00063
00064 #endif
00065
00066 #endif
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084