lemon/math.h
changeset 472 c46afb3f67a6
parent 440 88ed40ad0d4f
child 487 06787db0ef5f
equal deleted inserted replaced
2:4cac06acd64a 3:53ce7602f20b
    53   /// sqrt(2)
    53   /// sqrt(2)
    54   const long double SQRT2   = 1.4142135623730950488016887242096981L;
    54   const long double SQRT2   = 1.4142135623730950488016887242096981L;
    55   /// 1/sqrt(2)
    55   /// 1/sqrt(2)
    56   const long double SQRT1_2 = 0.7071067811865475244008443621048490L;
    56   const long double SQRT1_2 = 0.7071067811865475244008443621048490L;
    57 
    57 
       
    58   ///Check whether the parameter is NaN or not
       
    59   
       
    60   ///This function checks whether the parameter is NaN or not.
       
    61   ///Is should be equivalent with std::isnan(), but it is not
       
    62   ///provided by all compilers.
       
    63   inline bool isnan(double v)
       
    64     {
       
    65       return v!=v;
       
    66     }
    58 
    67 
    59   /// @}
    68   /// @}
    60 
    69 
    61 } //namespace lemon
    70 } //namespace lemon
    62 
    71