diff options
Diffstat (limited to 'boost/math/special_functions/asinh.hpp')
-rw-r--r-- | boost/math/special_functions/asinh.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/boost/math/special_functions/asinh.hpp b/boost/math/special_functions/asinh.hpp index a863e68854..e55a356284 100644 --- a/boost/math/special_functions/asinh.hpp +++ b/boost/math/special_functions/asinh.hpp @@ -36,6 +36,12 @@ namespace boost { BOOST_MATH_STD_USING + if((boost::math::isnan)(x)) + { + return policies::raise_domain_error<T>( + "boost::math::asinh<%1%>(%1%)", + "asinh requires a finite argument, but got x = %1%.", x, pol); + } if (x >= tools::forth_root_epsilon<T>()) { if (x > 1 / tools::root_epsilon<T>()) |