diff -r 04c0631fd332 -r 81627fa1b007 lemon/math.h --- a/lemon/math.h Mon Jan 12 13:37:37 2009 +0000 +++ b/lemon/math.h Wed Jan 14 15:55:29 2009 +0000 @@ -55,6 +55,15 @@ /// 1/sqrt(2) const long double SQRT1_2 = 0.7071067811865475244008443621048490L; + ///Check whether the parameter is NaN or not + + ///This function checks whether the parameter is NaN or not. + ///Is should be equivalent with std::isnan(), but it is not + ///provided by all compilers. + inline bool isnan(double v) + { + return v!=v; + } /// @}