diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-09-15 11:24:03 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-09-15 11:24:03 +0200 |
commit | fa9049a544f06d6f34782e0ba281cce44325c174 (patch) | |
tree | 428e9cda388ede8f2e5f521823917fee63400640 /Eigen/src/SVD/JacobiSVD.h | |
parent | b33144e4dff54d9c6349aa0ef6ebd8b0e99f4a01 (diff) |
Let be consistent and consider any denormal number as zero.
Diffstat (limited to 'Eigen/src/SVD/JacobiSVD.h')
-rw-r--r-- | Eigen/src/SVD/JacobiSVD.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 78dfd1d59..ea2bd62eb 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -665,10 +665,8 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig // only worsening the precision of U and V as we accumulate more rotations const RealScalar precision = RealScalar(2) * NumTraits<Scalar>::epsilon(); - // limit for very small denormal numbers to be considered zero in order to avoid infinite loops (see bug 286) - // FIXME What about considerering any denormal numbers as zero, using: - // const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)(); - const RealScalar considerAsZero = RealScalar(2) * std::numeric_limits<RealScalar>::denorm_min(); + // limit for denormal numbers to be considered zero in order to avoid infinite loops (see bug 286) + const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)(); // Scaling factor to reduce over/under-flows RealScalar scale = matrix.cwiseAbs().maxCoeff(); |