diff options
Diffstat (limited to 'boost/math/special_functions/atanh.hpp')
-rw-r--r-- | boost/math/special_functions/atanh.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/boost/math/special_functions/atanh.hpp b/boost/math/special_functions/atanh.hpp index 2c5e3f4b78..871a465a8c 100644 --- a/boost/math/special_functions/atanh.hpp +++ b/boost/math/special_functions/atanh.hpp @@ -51,6 +51,12 @@ namespace boost function, "atanh requires x <= 1, but got x = %1%.", x, pol); } + else if((boost::math::isnan)(x)) + { + return policies::raise_domain_error<T>( + function, + "atanh requires -1 <= x <= 1, but got x = %1%.", x, pol); + } else if(x < -1 + tools::epsilon<T>()) { // -Infinity: |