diff -r c35afa9e89e7 -r ef88c0a30f85 lemon/math.h --- a/lemon/math.h Mon Jan 12 23:11:39 2009 +0100 +++ b/lemon/math.h Thu Nov 05 15:48:01 2009 +0100 @@ -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; + } /// @}