Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@peterstangl
Copy link
Member

So far, the Takagi factorization only worked correctly for matrices with distinct singular values. This PR provides a fix for Takagi factorizations of matrices with degenerate singular values (cf. https://www.sciencedirect.com/science/article/abs/pii/S0096300314002239).

@DavidMStraub
Copy link
Collaborator

Cool, looks good! And makes sense to check if sqrt is enough since it seems to be MUCH faster (not surprisingly). How did you come up with the 1e-14 limit?

@peterstangl
Copy link
Member Author

The 1e-14 limit is a bit arbitrary. I thought that sqrt should only be used if the matrix z2 is certainly diagonal, which is why I used a limit as small as possible. From numerical uncertainties, differences of few times 1e-16 are very common, so if I only consider factors of 10, the smallest reasonable limit might be 1e-15. But some numerical uncertainties might be a bit larger and reach 1e-15, which is why I chose 1e-14. I'm not sure if that's a good choice. I'm also not sure if one should discard the off-diagonal elements in z2 if sqrt is used (if the limit is as small as 1e-14 this shouldn't make a big difference).

@DavidMStraub DavidMStraub merged commit 391df83 into flav-io:master Aug 2, 2023
@peterstangl peterstangl deleted the mtakfac branch August 2, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants