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

eigvecs returns wrong result. zero testing issue? #427

Closed
jamblejoe opened this issue May 27, 2021 · 2 comments
Closed

eigvecs returns wrong result. zero testing issue? #427

jamblejoe opened this issue May 27, 2021 · 2 comments

Comments

@jamblejoe
Copy link

See the following code. The eigenvectors calculated by SymPy are not correct. They are pretty off. SymPy verions is SymPy v1.0.46.

julia> A = Sym[0 3//2 0; 3//2 0 1; 0 1 0]
3×3 Matrix{Sym}:
   0  3/2  0
 3/2    0  1
   0    1  0

julia> eigvecs(A)
3×3 Matrix{Sym}:
 -2/3          3/2         3/2
    0  -sqrt(13)/2  sqrt(13)/2
    1            1           1

julia> eigvecs(float.(A))
3×3 Matrix{Float64}:
 -0.588348  -0.5547       0.588348
  0.707107  -4.92673e-16  0.707107
 -0.392232   0.83205      0.392232
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

julia>
@jverzani
Copy link
Collaborator

It looks like the floating point values are just normalized to have norm 1, the SymPy ones not.

@jamblejoe
Copy link
Author

@jverzani Thank you. You are right. This can be closed.

@jverzani jverzani closed this as completed Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants