JuliaLinearAlgebra / Arpack.jl

Julia Wrappers for the arpack-ng Fortran library
https://arpack.julialinearalgebra.org/stable
MIT License
69 stars 29 forks source link

Non-symmetric generalized eigenvalue problem returns nonsense #108

Closed andreasnoack closed 3 years ago

andreasnoack commented 4 years ago

With Arpack v0.4.0

julia> using Random

julia> Random.seed!(123);

julia> A, B = randn(10, 10), randn(10, 10);

julia> eigs(A, B)[1]
6-element Array{Complex{Float64},1}:
  -151.1191084257427 + 112.09488277655203im
  -151.1191084257427 - 112.09488277655203im
 -107.19303235466572 + 138.3953386142725im
 -107.19303235466572 - 138.3953386142725im
   38.28443200229703 + 161.9026471818083im
   38.28443200229703 - 161.9026471818083im

julia> eigvals(A, B)
10-element Array{Complex{Float64},1}:
  -1.5890593835520253 + 0.0im
 -0.46606545105717906 - 1.8530997035190155im
 -0.46606545105717906 + 1.8530997035190155im
 -0.42624111930231023 + 0.0im
  -0.1872186175197473 - 0.42921648693968706im
 -0.18721861751974728 + 0.42921648693968706im
  0.35510169501833044 - 0.24008385520597186im
  0.35510169501833044 + 0.24008385520597186im
   1.0393778462995493 + 0.0im
   10.699131407989494 + 0.0im

julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
ViralBShah commented 3 years ago

Fixed by #111