mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Fix underflow in 3x3 tridiagonalization
This commit is contained in:
parent
18c9d155f3
commit
b0d08869a9
@ -464,9 +464,10 @@ struct tridiagonalization_inplace_selector<MatrixType,3,false>
|
|||||||
static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)
|
static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)
|
||||||
{
|
{
|
||||||
using std::sqrt;
|
using std::sqrt;
|
||||||
|
const RealScalar tol = (std::numeric_limits<RealScalar>::min)();
|
||||||
diag[0] = mat(0,0);
|
diag[0] = mat(0,0);
|
||||||
RealScalar v1norm2 = numext::abs2(mat(2,0));
|
RealScalar v1norm2 = numext::abs2(mat(2,0));
|
||||||
if(v1norm2 == RealScalar(0))
|
if(v1norm2 <= tol)
|
||||||
{
|
{
|
||||||
diag[1] = mat(1,1);
|
diag[1] = mat(1,1);
|
||||||
diag[2] = mat(2,2);
|
diag[2] = mat(2,2);
|
||||||
|
Loading…
Reference in New Issue
Block a user