JacobiSVD fails to terminate for close to zero matrix

Submitted by Hordur Johannsson

Assigned to Benoit Jacob

Link to original bugzilla bug (#286)
Version: 3.0
Operating system: Linux

Description

The following program fails to terminate. Compiled with GCC 4.5 on 64bit Linux.
It enters an infinite loop in JacobiSVD::compute.

#include <iostream>
#include <Eigen/Dense>

using namespace std;
using namespace Eigen;

int main(int argc, char** argv)
{
Matrix3d M;
M <<
1.86735629661267e-312, 2.31297541254246e-312, 1.50661701211893e-312,
2.97079410817647e-312, 1.99467604392731e-312, 1.78247646489995e-312,
1.95223612808824e-312, 2.01589600199507e-312, 2.31297541262645e-312;

JacobiSVD<Matrix3d, 2> SVD(M);

return 0;
}

Edited by Eigen Bugzilla