mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Some of our unit tests require mathematical constants and thus we rely on non-ansi code.
It seems as if the new standard removed pow(T,int). M_PIL is only defined when _GNU_SOURCE is defined.
This commit is contained in:
@@ -272,7 +272,7 @@ void MatrixExponential<MatrixType>::computeUV(float)
|
||||
} else {
|
||||
const float maxnorm = 3.925724783138660f;
|
||||
m_squarings = std::max(0, (int)ceil(log2(m_l1norm / maxnorm)));
|
||||
MatrixType A = *m_M / std::pow(Scalar(2), m_squarings);
|
||||
MatrixType A = *m_M / std::pow(Scalar(2), Scalar(m_squarings));
|
||||
pade7(A);
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ void MatrixExponential<MatrixType>::computeUV(double)
|
||||
} else {
|
||||
const double maxnorm = 5.371920351148152;
|
||||
m_squarings = std::max(0, (int)ceil(log2(m_l1norm / maxnorm)));
|
||||
MatrixType A = *m_M / std::pow(Scalar(2), m_squarings);
|
||||
MatrixType A = *m_M / std::pow(Scalar(2), Scalar(m_squarings));
|
||||
pade13(A);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user