{
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>
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:
// 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/