Skip to content

Commit 0943428

Browse files
committed
Missed a couple
1 parent d070e18 commit 0943428

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stan/math/fwd/fun/pow.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ inline fvar<T> pow(const fvar<T>& x1, const fvar<T>& x2) {
2525
}
2626

2727
template <typename T, typename U, typename = require_arithmetic_t<U>>
28-
inline fvar<T> pow(U x1, const fvar<T>& x2) {
28+
inline fvar<T> pow(const U& x1, const fvar<T>& x2) {
2929
using std::log;
3030
using std::pow;
3131
T u = pow(x1, x2.val_);
3232
return fvar<T>(u, x2.d_ * log(x1) * u);
3333
}
3434

3535
template <typename T, typename U, typename = require_arithmetic_t<U>>
36-
inline fvar<T> pow(const fvar<T>& x1, U x2) {
36+
inline fvar<T> pow(const fvar<T>& x1, const U& x2) {
3737
using std::pow;
3838
using std::sqrt;
3939
if (x2 == -2) {

0 commit comments

Comments
 (0)