Jacobi rotation produces wrong result with complex numbers vectorization
Submitted by Benoit Jacob
Assigned to Gael Guennebaud @ggael
Link to original bugzilla bug (#39)
Version: 3.0
Description
The test case for this bug is that with seed 1286831068, the test jacobisvd_8 is failing with SSE, but succeeding without.
The precise place where it's failing is in JacobiSVD::compute() for complex<double>, specifically at JacobiSVD.h:514:
if(computeU()) m_matrixU.applyOnTheRight(p,q,j_left.transpose());
At some point, before this operation, both columns p and q have norm 1, and the rotation j_left does satisfy c^2 + s^2 == 1, and after this operation the norms of p and q are different from 1 (they are like 0.98... and 1.015...).
When this happens, my matrix is 11x11 so there is definitely some unaligned boundary when applying the Jacobi rotation to the columns.
Notice that here, while the matrixX is complex, the rotation j_left is real.