mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-20 00:29:38 +08:00
fix bug #44: use VERIFY_IS_APPROX instead of exact comparison to please x87 extended precision
This commit is contained in:
parent
c8ecc897c0
commit
bcb9068268
@ -67,15 +67,15 @@ void jacobisvd_compare_to_full(const MatrixType& m,
|
||||
|
||||
JacobiSVD<MatrixType, QRPreconditioner> svd(m, computationOptions);
|
||||
|
||||
VERIFY_IS_EQUAL(svd.singularValues(), referenceSvd.singularValues());
|
||||
VERIFY_IS_APPROX(svd.singularValues(), referenceSvd.singularValues());
|
||||
if(computationOptions & ComputeFullU)
|
||||
VERIFY_IS_EQUAL(svd.matrixU(), referenceSvd.matrixU());
|
||||
VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU());
|
||||
if(computationOptions & ComputeThinU)
|
||||
VERIFY_IS_EQUAL(svd.matrixU(), referenceSvd.matrixU().leftCols(diagSize));
|
||||
VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU().leftCols(diagSize));
|
||||
if(computationOptions & ComputeFullV)
|
||||
VERIFY_IS_EQUAL(svd.matrixV(), referenceSvd.matrixV());
|
||||
VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV());
|
||||
if(computationOptions & ComputeThinV)
|
||||
VERIFY_IS_EQUAL(svd.matrixV(), referenceSvd.matrixV().leftCols(diagSize));
|
||||
VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV().leftCols(diagSize));
|
||||
}
|
||||
|
||||
template<typename MatrixType, int QRPreconditioner>
|
||||
|
Loading…
x
Reference in New Issue
Block a user