# Logabsdet(singular)

**URL:** <https://discourse.julialang.org/t/logabsdet-singular/13706>\
**Category:** Numerics\
**Tags:** linearalgebra\
**Created:** [August 19, 2018, 9:44am UTC](https://discourse.julialang.org/t/logabsdet-singular/13706 "2018-08-19T09:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![improbable22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/improbable22/32/5464_2.png) [@improbable22](https://discourse.julialang.org/u/improbable22)\
**Post date:** [August 19, 2018, 9:44am UTC](https://discourse.julialang.org/t/logabsdet-singular/13706/1 "2018-08-19T09:44:30Z")

</div>

I have lots of matrices with very small positive eigenvalues. In Julia 0.6 I was calling `ld, s = logabsdet(m)`, but updating to v0.7, this now gives an error when `det(m)==0`. (It’s not physically zero, just numerical precision.)

Is this the desired behaviour? I would have thought that the purpose of `logabsdet(m)` was precisely for cases like this.

```julia
for i=1:10
    v = rand(4)
    m = v .* v'
    @show det(m) ## zero about one in ten times...
    @show logabsdet(m) ## ... then error in v0.7
end

```

The error is

```julia
ERROR: SingularException(20)
Stacktrace:
 [1] checknonsingular at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/LinearAlgebra/src/factorization.jl:12 [inlined]
 [2] #lu!#97(::Bool, ::Function, ::Array{Float64,2}, ::Val{true}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v0.7/LinearAlgebra/src/lu.jl:41

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [August 19, 2018, 9:50am UTC](https://discourse.julialang.org/t/logabsdet-singular/13706/2 "2018-08-19T09:50:54Z")

</div>

This is a bug that was introduced in `v0.7`/`v1.0.0` ([logabsdet fails for singular matrices · Issue #28619 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/28619)) but a fix ([https://github.com/JuliaLang/julia/pull/28620](https://github.com/JuliaLang/julia/pull/28620)) will be in Juila `v1.0.1`.

---

<div class="post-metadata">

**Author:** ![improbable22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/improbable22/32/5464_2.png) [@improbable22](https://discourse.julialang.org/u/improbable22)\
**Post date:** [August 19, 2018, 9:56am UTC](https://discourse.julialang.org/t/logabsdet-singular/13706/3 "2018-08-19T09:56:57Z")

</div>

Ah good, that’s perfect, thanks!
