Skip to content

Commit 7a204da

Browse files
committed
ret_t in wiener4_lccdf for type derivation error
1 parent ea8ae10 commit 7a204da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stan/math/prim/prob/wiener4_lccdf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ inline auto wiener4_ccdf_grad_a(const T_y& y, const T_a& a, const T_v& v,
133133
// derivative of the wiener probability w.r.t. 'a' (on log-scale)
134134
auto prob_grad_a = -wiener_prob_derivative_term(a, v, w) * v;
135135
if (!is_scal_finite(prob_grad_a)) {
136-
return ret_t(NEGATIVE_INFTY);
136+
prob_grad_a = ret_t(NEGATIVE_INFTY);
137137
}
138138
const auto log_prob_hit_upper = log_wiener_prob_hit_upper(a, v, w);
139139
const auto cdf_grad_a = wiener4_cdf_grad_a(y, a, v, w, cdf, log_err);

0 commit comments

Comments
 (0)