You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a test that I'm trying to get working for BigFloats. It somewhat randomly constructs 5,000 symmetric real 4x4 matrices of BigFloats and extracts the dominant eigenvector of each. For 3 of these instances, I get results for which the answer is not an eigenvector at all (never mind with the given eigenvalue). There doesn't seem to be anything special about these matrices. I've extracted one to provide a concrete MWE. The eigenvalues of this matrix are expected to be (and reported as) [-1, -1, -1, 3], so I don't know that there would be any numerical problem here.
Here's the MWE:
using LinearAlgebra
using GenericLinearAlgebra
using StaticArrays
M =Symmetric(@SMatrix[
big"-0.4080898675832881399369478084264191594976530854542904557798567397269356887436951";
big"-0.1032324294981949906363774065395184125237581835226155628209100984396171211818558";
big"-1.0795157507124452910839896877334667387210301781514938067860918240771876343947";
big"0.9172086645212876240254394768180975107502376572771647296150618931226550446699544";;
big"-0.1032324294981949906363774065395184125237581835226155628209100984396171211818558";
big"-0.9819956883377066621250198846550622559246996804965712336465013506629992739010227";
big"0.1882735697944729855991976669864503854920622386133987141371224931350749728226066";
big"-0.1599663084136352437739757607131301560774255778371317602542426234968564801904052";;
big"-1.0795157507124452910839896877334667387210301781514938067860918240771876343947";
big"0.1882735697944729855991976669864503854920622386133987141371224931350749728226066";
big"0.9688026817149176598146701814747478080649943014810992426739997593840858865727305";
big"-1.672789745967021000172452940954243617442140494364475046869527486458478435262502";;
big"0.9172086645212876240254394768180975107502376572771647296150618931226550446699544";
big"-0.1599663084136352437739757607131301560774255778371317602542426234968564801904052";
big"-1.672789745967021000172452940954243617442140494364475046869527486458478435262502";
big"0.4212828742060771422472975116067336073573584644697624467523583310058490760719874"
])
eigensystem =eigen(M)
Here, the supposed dominant eigenvector is
julia> eigensystem.vectors[:, 4]
4-element SVector{4, BigFloat} with indices SOneTo(4):0.52931860349064685135830440455789911871767673539918852851605933371621406398333330.6076028636690888706511331534102457699010874314100936245656011216542549302322659-0.53758889750418105762353843529777280367229781619944709316190508086636629183535760.2482715314732502633344123259979948815899264503590173204924838651280614259806134
should be a vector with entries that are at least approximately equal. Instead, I get
4-element SVector{4, BigFloat} with indices SOneTo(4):0.9999999999999999999999999999999999999999999999999999999999999999999999999999309-1.3038699228087372558658181373166818724339510506817409497890812945674060340612922.5914520436469916364256166217659596185538712359168512525735712483440975795078875.607430516593620629517859036040424284010328224975389025670154530756814862123736
It's interesting to note eigensystem.vectors[:, 1] is also not an eigenvector.
The dominant eigenvector (with eigenvalue 3) that I expect in this case is
Uh oh!
There was an error while loading. Please reload this page.
I have a test that I'm trying to get working for BigFloats. It somewhat randomly constructs 5,000 symmetric real 4x4 matrices of BigFloats and extracts the dominant eigenvector of each. For 3 of these instances, I get results for which the answer is not an eigenvector at all (never mind with the given eigenvalue). There doesn't seem to be anything special about these matrices. I've extracted one to provide a concrete MWE. The eigenvalues of this matrix are expected to be (and reported as) [-1, -1, -1, 3], so I don't know that there would be any numerical problem here.
Here's the MWE:
Here, the supposed dominant eigenvector is
and its reported eigenvalue (3) is nonzero, so
should be a vector with entries that are at least approximately equal. Instead, I get
It's interesting to note
eigensystem.vectors[:, 1]
is also not an eigenvector.The dominant eigenvector (with eigenvalue 3) that I expect in this case is
and indeed I get the expected eigenvector behavior with the given matrix:
The text was updated successfully, but these errors were encountered: