Skip to content
Snippets Groups Projects
Verified Commit d801511e authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[Math/AutoDiff] use correct pow functions

parent f1b0d913
No related branches found
No related tags found
No related merge requests found
......@@ -57,10 +57,14 @@ namespace se3
{
using std::fabs;
using std::sqrt;
using std::acos;
using std::pow;
#ifdef PINOCCHIO_WITH_CPPAD_SUPPORT
using CppAD::fabs;
using CppAD::sqrt;
using CppAD::acos;
using CppAD::pow;
#endif
}
}
......
......@@ -96,7 +96,7 @@ namespace se3
const Scalar alpha = ((Scalar)3 - N2) / Scalar(2);
const_cast <Eigen::QuaternionBase<D> &> (q).coeffs() *= alpha;
#ifndef NDEBUG
const Scalar M = Scalar(3) * std::pow(Scalar(1)-epsilon, ((Scalar)-Scalar(5))/Scalar(2)) / Scalar(4);
const Scalar M = Scalar(3) * math::pow(Scalar(1)-epsilon, ((Scalar)-Scalar(5))/Scalar(2)) / Scalar(4);
assert(math::fabs(q.norm() - Scalar(1)) <=
std::max(M * sqrt(N2) * (N2 - Scalar(1))*(N2 - Scalar(1)) / Scalar(2), Eigen::NumTraits<Scalar>::dummy_precision()));
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment