For some matrices, this loop starts to loop infinitely:
I did some debugging, and this if statement appears to always be true:
|
if ( ( Math.abs( B.val[(n-1)*B.n + n-2] ) > TOL ) || (Math.abs(B.val[(n-2)*B.n + n-1]) > TOL ) ) { |
Calling svd on this matrix (it's centered) will trigger the infinite loop:
[
[-0.5, -0.5, 1, -1.5, 1.5, 0],
[0.5, 0.5, -1, 1.5, -1.5, 0]
]
but this one won't:
[
[-0.5, -0.5, 1, -1.5, 1.5, 0],
[0.5, 0.5, -1, 1.5, -1.5, 1]
]
I tried a few different examples and not every centered matrix triggers this issue, but I haven't found a non-centered matrix that triggers the problem.
For some matrices, this loop starts to loop infinitely:
MLweb/lalolab/src/linalg.js
Line 6938 in bf9a67c
I did some debugging, and this if statement appears to always be true:
MLweb/lalolab/src/linalg.js
Line 6947 in bf9a67c
Calling
svdon this matrix (it's centered) will trigger the infinite loop:but this one won't:
I tried a few different examples and not every centered matrix triggers this issue, but I haven't found a non-centered matrix that triggers the problem.