Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / math / special_functions / atanh.hpp
index d447e20..2c5e3f4 100644 (file)
@@ -31,17 +31,6 @@ namespace boost
     {
        namespace detail
        {
-#if defined(__GNUC__) && (__GNUC__ < 3)
-        // gcc 2.x ignores function scope using declarations,
-        // put them in the scope of the enclosing namespace instead:
-        
-        using    ::std::abs;
-        using    ::std::sqrt;
-        using    ::std::log;
-        
-        using    ::std::numeric_limits;
-#endif
-        
         // This is the main fare
         
         template<typename T, typename Policy>
@@ -56,6 +45,12 @@ namespace boost
                   function,
                   "atanh requires x >= -1, but got x = %1%.", x, pol);
             }
+            else if(x > 1)
+            {
+               return policies::raise_domain_error<T>(
+                  function,
+                  "atanh requires x <= 1, but got x = %1%.", x, pol);
+            }
             else if(x < -1 + tools::epsilon<T>())
             {
                // -Infinity:
@@ -66,12 +61,6 @@ namespace boost
                // Infinity:
                return policies::raise_overflow_error<T>(function, 0, pol);
             }
-            else if(x > 1)
-            {
-               return policies::raise_domain_error<T>(
-                  function,
-                  "atanh requires x <= 1, but got x = %1%.", x, pol);
-            }
             else if(abs(x) >= tools::forth_root_epsilon<T>())
             {
                 // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/