AutoDiffScalar.h std::pow(x,y)
Submitted by 432..@..il.com
Assigned to Nobody
Link to original bugzilla bug (#1250)
Version: 3.3 (current stable)
Description
Hello,
I would propose the following change in AutoDiffScalar.h (head)
< return Eigen::MakeAutoDiffScalar(std::pow(x.value(),y), x.derivatives() * (y * std::pow(x.value(),y-1)));
620c620,621using std::pow;
return Eigen::MakeAutoDiffScalar(pow(x.value(),y), x.derivatives() * (y * pow(x.value(),y-1)));
The current implementation, i.e. see first line, gives a compile error
if mpreal from unsupported/MPFRC++ Support module is used as a Scalar.
The proposed change follows the idea of the rest of AutoDiffScalar.h
Bye
Ralf
Edited by Eigen Bugzilla