-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVD loops forever in certain cases #5
Comments
Thanks for reporting this issue. Can you provide a test case that I can use to debug? |
Yes, I think so. Upon further examination, looks like it's happening with rank deficient matrices. Try this one:
|
I also notice you have some divisions by 2 instead of 2.0, which will cause truncation (separate issue). |
I don't believe dividing a float or double by an integer will cause truncation. |
3075929 fixes this issue. |
@dmalhotra Huh, wow. You're totally right! I've been believing something that was totally wrong for the greater part of fifteen years. |
I'm not sure how to fix it, but your SVD algorithm isn't incrementing k0 in some cases — it then enters an infinite loop.
First found it here: http://stackoverflow.com/questions/3856072/single-value-decomposition-implementation-c/25291714#25291714
The text was updated successfully, but these errors were encountered: