Skip to content
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

logabsdet for complex matrices #277

Closed
garrison opened this issue Oct 29, 2015 · 2 comments
Closed

logabsdet for complex matrices #277

garrison opened this issue Oct 29, 2015 · 2 comments
Labels
complex Complex numbers help wanted Extra attention is needed

Comments

@garrison
Copy link
Member

logabsdet is a function that returns (log(abs(det(M))), sign(det(M)) but may provide increased accuracy and/or speed (and is less likely to overflow). At the moment it works only for real matrices, but I believe it would be great if it were implemented also for complex matrices.

From glancing at the code (and earlier discussion at #13), I see no reason it cannot work for complex matrices as well. Note that julia's sign function is indeed implemented for complex numbers, so the interface can be exactly equivalent to the current one.

EDIT: on the other hand, I believe logdet should only be implemented for real matrices, as is currently the case. OK, apparently logdet is implemented for some complex matrices.

Thoughts?

CC @mishmash

@jiahao
Copy link
Member

jiahao commented Oct 29, 2015

Sure, I don't see why not. The only possible complication I foresee is propagating the branch cut of log properly.

@jiahao jiahao added the help wanted Extra attention is needed label Oct 29, 2015
@kshyatt kshyatt added linear algebra complex Complex numbers labels Oct 29, 2015
@andreasnoack
Copy link
Member

Fine with me. The changes required are minimal: just remove the restriction to real inputs and make the accumulator real by wrapping the T in a real.

kshyatt referenced this issue in JuliaLang/julia Dec 1, 2015
Fix #13823, add logabsdet for complex matrices
@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex Complex numbers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants