-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
A = [1.0 1.0; 1.0 1.0]
det(A) * inv(A)
# ERROR: SingularException(2)
to be fair, the LU approach is remarkably resiliant...
A = [1.0 1.0; 1.0 1.0-1e-16]
det(A) * inv(A)
# 2×2 Matrix{Float64}:
# 1.0 -1.0
# -1.0 1.0
But I am nervous that this is too simple a special case to draw any conclusions.
Either way - it seems to me that an implementation that always works and is guaranteed numerically stable is preferrable. If the maintainers agree, then I would be happy to make a PR and implement frule
and rrule
via SVD instead of LU.
Questions:
- should the det evaluation then also use SVD, or should it use whichever the standard implementation is?
- should the SVD implementation be only for a specific class of matrices, or general? E.g. I'm unsure about sparse.
- I noticed that there are rules for
svd
- I'm guessing this means one will be able to differentate thefrule
orrrule
based on SVD?
Metadata
Metadata
Assignees
Labels
No labels