summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/log1p.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math/special_functions/log1p.hpp')
-rw-r--r--boost/math/special_functions/log1p.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/boost/math/special_functions/log1p.hpp b/boost/math/special_functions/log1p.hpp
index 50bdaeb385..7fa1eb8de9 100644
--- a/boost/math/special_functions/log1p.hpp
+++ b/boost/math/special_functions/log1p.hpp
@@ -80,7 +80,7 @@ T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&)
static const char* function = "boost::math::log1p<%1%>(%1%)";
- if(x < -1)
+ if((x < -1) || (boost::math::isnan)(x))
return policies::raise_domain_error<T>(
function, "log1p(x) requires x > -1, but got x = %1%.", x, pol);
if(x == -1)