We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe69a5b commit c93b2f5Copy full SHA for c93b2f5
1 file changed
stan/math/prim/fun/owens_t.hpp
@@ -3,7 +3,6 @@
3
4
#include <stan/math/prim/meta.hpp>
5
#include <stan/math/prim/functor/apply_scalar_binary.hpp>
6
-#include <stan/math/prim/fun/boost_policy.hpp>
7
#include <boost/math/special_functions/owens_t.hpp>
8
9
namespace stan {
@@ -57,7 +56,10 @@ namespace math {
57
56
* @return Owen's T function applied to the arguments.
58
*/
59
inline double owens_t(double h, double a) {
60
- return boost::math::owens_t(h, a, boost_policy_t<>());
+ if (unlikely(std::isnan(h) || std::isnan(a))) {
+ return std::numeric_limits<double>::quiet_NaN();
61
+ }
62
+ return boost::math::owens_t(h, a);
63
}
64
65
/**
0 commit comments