Re: [Mplapack-devel] Can I compute eigenvalues of ill-conditioned matrix less than 10^-156 ?
Status: Pre-Alpha
Brought to you by:
nakatamaho
From: Gang Y. <ee...@gm...> - 2011-09-22 16:55:43
|
Hi Maho, Thanks so much. On Thu, Sep 22, 2011 at 10:41 PM, Maho NAKATA <ch...@ma...> wrote: > Hi Gang Yan, > > sorry for long delay. > > From: Gang Yan <ee...@gm...> > Subject: Re: [Mplapack-devel] Can I compute eigenvalues of ill-conditioned > matrix less than 10^-156 ? > Date: Tue, 13 Sep 2011 01:35:22 -0400 > > > Many thanks, Maho. Attached please find the source code. > > > > A20.dat is the input matrix, eigenvalue_mpfr.cpp is the source code > modified > > from your example code. > ok, > > > Place the two files into the folder mpack-0.6.7/examples/mlapack/ and use > > commands "make" and "./eigenvalue_mpfr", it will show the results of > the > > largest and smallest eigenvalues. > done. > > > It is shown that when the variable tt (a time variable in my program) is > > very small, the matrix will become extremely ill-conditioned, and the > > smallest eigenvalue will be less than 1e-156 and thus become negative. > following output is correct wrong result? > The output is the same as mine. But it is wrong. Because the matrix is positive definite and all the eigenvalues should be positive, but ... > --- > OK > [ [ 1.644791426e1]; [ 1.722920009e1]; [ 1.747945946e1]; [ 1.766113939e1]; [ > 1.776131407e1]; [ 1.810655068e1]; [ 1.869304632e1]; [ 1.913033628e1]; [ > 1.941946805e1]; [ 1.992760133e1]; [ 2.000190806e1]; [ 2.041030420e1]; [ > 2.073058106e1]; [ 2.092543236e1]; [ 2.108105957e1]; [ 2.166945660e1]; [ > 2.212463197e1]; [ 2.255747777e1]; [ 2.281199141e1]; [ 2.583112709e1] ] > OK > 1.000000000e-4 9.980027172e-5 9.980027105e-5 -3.323972836e-158 > ~~~~~~~~~~~~~~~ > 2.000000000e-4 1.992021715e-4 1.992021662e-4 -8.891981975e-159 > ~~~~~~~~~~~~~~~ > 4.000000000e-4 3.968173357e-4 3.968172935e-4 -1.165480641e-159 > ~~~~~~~~~~~~~~~~ > 8.000000000e-4 7.873381119e-4 7.873377765e-4 3.018299932e-160 > 1.600000000e-3 1.549895802e-3 1.549893166e-3 -2.121601048e-158 > ~~~~~~~~~~~~~~~~ but the smallest eigenvalues as pointed out ~~~~~~~~~ are negative. So it is wrong. I think the program can only compute the eigenvalues which are larger than 1e-156 accurately. Do you think so? Or I am wrong for some reasons? Thanks. P.S., the mid two columns are the largest eigenvalues, they all are correct. 3.200000000e-3 3.003823837e-3 3.003803478e-3 5.848200770e-153 > 6.400000000e-3 5.647598950e-3 5.647447187e-3 3.014126150e-141 > 1.280000000e-2 1.002517109e-2 1.002411737e-2 1.456356388e-129 > 2.560000000e-2 1.606256118e-2 1.605621952e-2 6.184498678e-118 > 5.120000000e-2 2.193695924e-2 2.190825888e-2 2.028549225e-106 > 1.024000000e-1 2.495037779e-2 2.487359809e-2 3.969087087e-95 > 2.048000000e-1 2.545631687e-2 2.535104125e-2 2.761963837e-84 > 4.096000000e-1 2.546875365e-2 2.536157283e-2 2.427716249e-74 > 8.192000000e-1 2.546876239e-2 2.536157891e-2 3.411560868e-66 > 1.638400000 2.546876239e-2 2.536157891e-2 1.315185105e-61 > 3.276800000 2.546876239e-2 2.536157891e-2 2.514747138e-61 > 6.553600000 2.546876239e-2 2.536157891e-2 2.514747138e-61 > 1.310720000e1 2.546876239e-2 2.536157891e-2 2.514747138e-61 > 2.621440000e1 2.546876239e-2 2.536157891e-2 2.514747138e-61 > 5.242880000e1 2.546876239e-2 2.536157891e-2 2.514747138e-61 > --- > > thanks > -- Nakata Maho http://accc.riken.jp/maho/ , JA OOO > http://ja.openoffice.org/ > http://blog.goo.ne.jp/nakatamaho/ ,GPG: > http://accc.riken.jp/maho/maho.pgp.txt > best, gang |