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 812ae25 commit c5caa59Copy full SHA for c5caa59
stan/math/rev/fun/tan.hpp
@@ -57,11 +57,11 @@ inline var tan(const var& a) {
57
*/
58
template <typename VarMat, require_var_matrix_t<VarMat>* = nullptr>
59
inline auto tan(const VarMat& a) {
60
- return make_callback_var(
61
- a.val().array().tan().matrix(), [a](const auto& vi) mutable {
62
- a.adj() += vi.adj().cwiseProduct(
63
- (1.0 + vi.val().array().square()).matrix());
64
- });
+ return make_callback_var(a.val().array().tan().matrix(),
+ [a](const auto& vi) mutable {
+ a.adj() += vi.adj().cwiseProduct(
+ (1.0 + vi.val().array().square()).matrix());
+ });
65
}
66
67
/**
0 commit comments