projects
/
platform
/
upstream
/
boost.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Imported Upstream version 1.64.0
[platform/upstream/boost.git]
/
boost
/
math
/
special_functions
/
log1p.hpp
diff --git
a/boost/math/special_functions/log1p.hpp
b/boost/math/special_functions/log1p.hpp
index
50bdaeb
..
7fa1eb8
100644
(file)
--- 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)