00001 /* 00002 00003 freesteam - IAPWS-IF97 steam tables library 00004 Copyright (C) 2004-2005 John Pye 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License 00008 as published by the Free Software Foundation; either version 2 00009 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 */ 00021 00022 /* 00023 This file is a hack to make everything compile as normal on MinGW, which has a funny implementation of isnan and isinf 00024 00025 @see 00026 http://www.opensource.apple.com/darwinsource/10.3/libxml2-4/libxml2/include/win32config.h 00027 and http://www.devdaily.com/scw/c/cygwin/src/winsup/mingw/mingwex/math/cbrt.c.shtml 00028 00029 */ 00030 00031 #ifndef ISINFNAN_H 00032 #define ISINFNAN_H 00033 00034 #if defined(__MINGW32__) 00035 00036 #include <float.h> 00037 00038 inline int isnan(const double &x){ 00039 return _isnan(x); 00040 } 00041 00042 inline int isinf(const double &x){ 00043 return _finite(x) ? 0 : 1; 00044 } 00045 00046 00047 #endif 00048 #endif
1.3.8