JuliaLang / JuliaLang/LinearAlgebra.jl
inv returns wrong result for this SymTridiagonal([1., 0., 0.], [0., 1.])
- Dominant language
- Julia
- Stars
- 77
- Forks
- 65
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 10
Description
```julia
julia> using LinearAlgebra
julia> A = SymTridiagonal([1., 0., 0.], [0., 1.])
3×3 SymTridiagonal{Float64,Array{Float64,1}}:
1.0 0.0 ⋅
0.0 0.0 1.0
⋅ 1.0 0.0
julia> inv(A)
3×3 Array{Float64,2}:
NaN NaN NaN
NaN NaN NaN
NaN NaN NaN
julia> inv(convert(Array, A))
3×3 Array{Float64,2}:
1.0 -0.0 -0.0
0.0 -0.0 1.0
0.0 1.0 0.0
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = "C:\Users\wangc\AppData\Local\atom\app-1.34.0\atom.exe" -a
JULIA_NUM_THREADS = 2
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Julia snippet using SymTridiagonal and compare inv(A) with inv(convert(Array, A)). Trace the inv path for SymTridiagonal and determine why the result differs from the dense conversion; the example is the validation target, and done means inv(A) returns the expected inverse rather than an all-NaN matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100