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

Fix #13823, add logabsdet for complex matrices #14198

Merged
merged 1 commit into from
Dec 1, 2015
Merged

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Nov 30, 2015

Following the discussion over at JuliaLang/LinearAlgebra.jl#277, I added logabsdet for Complex types. I changed the test a little bit to make sure the signs will match (they are only ever not exactly the same for the complex matrices).

@kshyatt kshyatt added linear algebra Linear algebra complex Complex numbers labels Nov 30, 2015
@@ -22,11 +22,11 @@ for elty in (Int, Rational{BigInt}, Float32, Float64, BigFloat, Complex{Float32}
debug && println("element type: $elty")

@test_approx_eq logdet(A) log(det(A))
@test_approx_eq logabsdet(A)[1] log(abs(det(A)))
@test logabsdet(A)[2] ≈ sign(det(A))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this test exact equality for real and approx for complex?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sure could!

@andreasnoack
Copy link
Member

👍

@tkelman
Copy link
Contributor

tkelman commented Dec 1, 2015

lgtm

kshyatt added a commit that referenced this pull request Dec 1, 2015
Fix #13823, add logabsdet for complex matrices
@kshyatt kshyatt merged commit 2daa2d3 into master Dec 1, 2015
@kshyatt kshyatt deleted the ksh/logabsdet branch December 1, 2015 06:23
garrison added a commit that referenced this pull request Apr 20, 2017
KristofferC pushed a commit that referenced this pull request Apr 20, 2017
rofinn pushed a commit to invenia/julia that referenced this pull request Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex Complex numbers linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants