diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-07-25 14:42:19 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-07-25 14:42:19 +0200 |
commit | f9598d73b56430f34379945c45b80bdc65dc3d61 (patch) | |
tree | eebb19fefdec06bf86f39cdb8844f59b5091fcfb /unsupported/Eigen/src/AutoDiff | |
parent | fd1117f2be48f84e7e3e8390e87ffb6a6f605c23 (diff) |
bug #1250: fix pow() for AutoDiffScalar with custom nested scalar type.
Diffstat (limited to 'unsupported/Eigen/src/AutoDiff')
-rwxr-xr-x | unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 76bf2d96c..a4d12ab37 100755 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -617,7 +617,8 @@ EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<DerType>::t pow(const Eigen::AutoDiffScalar<DerType> &x, const typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar &y) { using namespace Eigen; - return Eigen::MakeAutoDiffScalar(std::pow(x.value(),y), x.derivatives() * (y * std::pow(x.value(),y-1))); + using std::pow; + return Eigen::MakeAutoDiffScalar(pow(x.value(),y), x.derivatives() * (y * pow(x.value(),y-1))); } |