BOOST_MATH_STD_USING
T a = fabs(x);
+ if((boost::math::isnan)(a))
+ {
+ return policies::raise_domain_error<T>("boost::math::expm1<%1%>(%1%)", "expm1 requires a finite argument, but got %1%", a, pol);
+ }
if(a > T(0.5f))
{
if(a >= tools::log_max_value<T>())