Skip to content

Commit a7958c7

Browse files
committed
fix expm1 return type
1 parent fe8e2e3 commit a7958c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stan/math/rev/fun/expm1.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ inline var expm1(const var& a) {
4242
}
4343

4444
template <typename T, require_matrix_t<T>* = nullptr>
45-
inline var expm1(const var_value<T>& a) {
46-
return make_callback_var(expm1(a.val()), [a](auto& vi) mutable {
45+
inline auto expm1(const var_value<T>& a) {
46+
return make_callback_var(expm1(a.val()).eval(), [a](auto& vi) mutable {
4747
a.adj().array() += vi.adj().array() * (vi.val().array() + 1.0);
4848
});
4949
}

0 commit comments

Comments
 (0)