/home/coin/SVN-release/OS-2.4.1/OS/src/OSUtils/OSParameters.cpp

Go to the documentation of this file.
00001 /* $Id: OSParameters.cpp 4234 2011-07-29 12:45:13Z Gassmann $ */
00019 #include "OSConfig.h"
00020 #include "OSParameters.h"
00021 
00022 #ifdef HAVE_CMATH
00023 # include <cmath>
00024 #else
00025 # ifdef HAVE_MATH_H
00026 #  include <math.h>
00027 # else
00028 #  error "don't have header file for math"
00029 # endif
00030 #endif
00031 #ifdef HAVE_CFLOAT
00032 # include <cfloat>
00033 #else
00034 # ifdef HAVE_FLOAT_H
00035 #  include <float.h>
00036 # endif
00037 #endif
00038 #ifdef HAVE_CIEEEFP
00039 # include <cieeefp>
00040 #else
00041 # ifdef HAVE_IEEEFP_H
00042 #  include <ieeefp.h>
00043 # endif
00044 #endif
00045 
00046 #include <sstream>
00047 
00048 using std::ostringstream;
00049 
00050 // this is taken directly from COINUTILS
00051 bool OSIsnan(double x)
00052 {
00053 #ifdef COIN_C_ISNAN
00054     return COIN_C_ISNAN( x)!=0;
00055 #else
00056     return (x != x);
00057 #endif
00058 }
00059 
00060 double OSNaN()
00061 {
00062 #ifdef OSNAN
00063     return OSNAN;
00064 #else
00065     // wow, what a last resort, I don't like this!
00066     double zero = 0.0;
00067     return 0.0/zero;
00068 #endif
00069 }
00070 
00071 std::string OSgetVersionInfo()
00072 {
00073     ostringstream versionInfo;
00074     versionInfo << std::endl << std::endl;
00075     versionInfo << "Optimization Services Solver";
00076     versionInfo << std::endl;
00077     versionInfo << "Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin";
00078     versionInfo << std::endl;
00079     versionInfo << "Distributed under the Eclipse Public License" ;
00080     versionInfo << std::endl;
00081     versionInfo << "OS Version: ";
00082     versionInfo << OS_VERSION;
00083     versionInfo << std::endl;
00084     versionInfo << "Build Date: ";
00085     versionInfo << __DATE__;
00086     versionInfo << std::endl;
00087 
00088 #ifdef OS_SVN_REV
00089     versionInfo << "SVN Version: ";
00090     versionInfo << OS_SVN_REV;
00091 #endif
00092 
00093     versionInfo << std::endl << std::endl;
00094     return versionInfo.str() ;
00095 }

Generated on Thu Nov 10 03:05:51 2011 by  doxygen 1.4.7