Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Jan 13, 2025
1 parent 1e105c3 commit a67a993
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions stan/math/rev/fun/inv_Phi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ template <typename T, require_var_matrix_t<T>* = nullptr>
inline auto inv_Phi(const T& p) {
const auto& arena_rtn = to_arena(inv_Phi(p.val()));
return make_callback_var(arena_rtn, [p, arena_rtn](auto& vi) mutable {
p.adj() += apply_scalar_binary(vi.adj(), arena_rtn.val(),
[](const auto& adj, const auto& rtn_val) {
return adj * exp(-std_normal_lpdf(rtn_val));
});
p.adj() += apply_scalar_binary(
vi.adj(), arena_rtn.val(), [](const auto& adj, const auto& rtn_val) {
return adj * exp(-std_normal_lpdf(rtn_val));
});
});
}

Expand Down
11 changes: 6 additions & 5 deletions stan/math/rev/prob/std_normal_log_qf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ template <typename T, require_stan_scalar_or_eigen_t<T>* = nullptr>
inline auto std_normal_log_qf(const var_value<T>& log_p) {
const auto& arena_rtn = to_arena(std_normal_log_qf(log_p.val()));
return make_callback_var(arena_rtn, [log_p, arena_rtn](auto& vi) mutable {
log_p.adj() += apply_scalar_ternary(
[](const auto& adj, const auto& logp_val, const auto& rtn_val) {
return adj * exp(logp_val - std_normal_lpdf(rtn_val));
}, vi.adj(), log_p.val(), arena_rtn.val());
});
log_p.adj() += apply_scalar_ternary(
[](const auto& adj, const auto& logp_val, const auto& rtn_val) {
return adj * exp(logp_val - std_normal_lpdf(rtn_val));
},
vi.adj(), log_p.val(), arena_rtn.val());
});
}

} // namespace math
Expand Down

0 comments on commit a67a993

Please sign in to comment.