MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Eigensystem


Vadim N. Smelyanskiy wrote:

<snip>

> Please can you advice me how to run Eigensystem function so that its result
> has precision (say 50)
> 
> that is much higher then the Machine Precision. 

Vadim,

Use either exact numbers (see m1) or SetPrecision (see m3).

In[1]:=
{lambda, mu} = Eigenvalues[m1 = {{2, 1}, {3, -1}}]
Precision /@ {m1, lambda, mu}

Out[1]=
  1                 1
{- (1 + Sqrt[21]), - (1 - Sqrt[21])}
  2                 2

Out[2]=
{Infinity, Infinity, Infinity}

In[3]:=
{lambda, mu} = Eigenvalues[m2 = {{2., 1.}, {3., -1.}}]
Precision /@ {m2, lambda, mu}

Out[3]=
{2.79129, -1.79129}

Out[4]=
{MachinePrecision, MachinePrecision, MachinePrecision}

In[5]:=
{lambda, mu} = Eigenvalues[
    m3 = SetPrecision[{{2., 1.}, {3., -1.}}, 50]]
Precision /@ {m3, lambda, mu}

Out[5]=
{2.7912878474779200032940235968640042444922282883840,

   -1.7912878474779200032940235968640042444922282883840}

Out[6]=
{50., 50., 50.}

Regards,
Jean-Marc


  • Prev by Date: Re: Eigensystem
  • Next by Date: Re: Eigensystem
  • Previous by thread: Re: Eigensystem
  • Next by thread: Re: Eigensystem