diff --git a/stdlib/LinearAlgebra/src/generic.jl b/stdlib/LinearAlgebra/src/generic.jl index ac55b9ed696ae..ea23e8d51cee7 100644 --- a/stdlib/LinearAlgebra/src/generic.jl +++ b/stdlib/LinearAlgebra/src/generic.jl @@ -1274,7 +1274,7 @@ julia> logabsdet(B) (0.6931471805599453, 1.0) ``` """ -logabsdet(A::AbstractMatrix) = logabsdet(lu(A)) +logabsdet(A::AbstractMatrix) = logabsdet(lu(A, check=false)) """ logdet(M) diff --git a/stdlib/LinearAlgebra/test/generic.jl b/stdlib/LinearAlgebra/test/generic.jl index 1c38883356efb..13d18e1d29b23 100644 --- a/stdlib/LinearAlgebra/test/generic.jl +++ b/stdlib/LinearAlgebra/test/generic.jl @@ -80,6 +80,8 @@ n = 5 # should be odd @test logdet(A) ≈ log(det(A)) @test logabsdet(A)[1] ≈ log(abs(det(A))) @test logabsdet(Matrix{elty}(-I, n, n))[2] == -1 + infinity = convert(float(elty), Inf) + @test logabsdet(zeros(elty, n, n)) == (-infinity, zero(elty)) if elty <: Real @test logabsdet(A)[2] == sign(det(A)) @test_throws DomainError logdet(Matrix{elty}(-I, n, n))