Bugzilla – Attachment 836 Details for
Bug 1528
Floating point underflow exception in tolerance computation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
same patch with comment cleanup
patch-with-comments (text/plain), 1.37 KB, created by
Anders Sundman
on 2018-03-15 16:44:36 UTC
(
hide
)
Description:
same patch with comment cleanup
Filename:
MIME Type:
Creator:
Anders Sundman
Created:
2018-03-15 16:44:36 UTC
Size:
1.37 KB
patch
obsolete
>diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h >--- a/Eigen/src/Cholesky/LDLT.h >+++ b/Eigen/src/Cholesky/LDLT.h >@@ -565,23 +565,18 @@ void LDLT<_MatrixType,_UpLo>::_solve_imp > > // dst = L^-1 (P b) > matrixL().solveInPlace(dst); > > // dst = D^-1 (L^-1 P b) > // more precisely, use pseudo-inverse of D (see bug 241) > using std::abs; > const typename Diagonal<const MatrixType>::RealReturnType vecD(vectorD()); >- // In some previous versions, tolerance was set to the max of 1/highest and the maximal diagonal entry * epsilon >- // as motivated by LAPACK's xGELSS: >- // RealScalar tolerance = numext::maxi(vecD.array().abs().maxCoeff() * NumTraits<RealScalar>::epsilon(),RealScalar(1) / NumTraits<RealScalar>::highest()); >- // However, LDLT is not rank revealing, and so adjusting the tolerance wrt to the highest >- // diagonal element is not well justified and leads to numerical issues in some cases. >- // Moreover, Lapack's xSYTRS routines use 0 for the tolerance. >- RealScalar tolerance = RealScalar(1) / NumTraits<RealScalar>::highest(); >+ // The paranthesis are there to avoid min from being macro expanded to the cmath macro min(,) >+ RealScalar tolerance = (std::numeric_limits<RealScalar>::min)(); > > for (Index i = 0; i < vecD.size(); ++i) > { > if(abs(vecD(i)) > tolerance) > dst.row(i) /= vecD(i); > else > dst.row(i).setZero(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1528
:
835
| 836