#2634 zgeev does not operate on real matrices

None
closed
nobody
lapack (5)
5
2013-10-07
2013-09-13
No

Within the lapack package, zgeev is the complex analogon to dgeev, which computes eigenvalues and ~vectors for real matrices.

Because real numbers should be a special type of complex number (i.e. by accident all imaginary parts are 0 ), zgeev should be able to deal with real valued matrices as well.

On the contrary, zgeev throws the error message "Error in IF [or a callee]: Wrong type error".

(%i58) S:matrix([1,0],[0,1]);
                                 [ 1  0 ]
(%o58)                           [      ]
                                 [ 0  1 ]
(%i59) dgeev(S,true,false);
                                 [ 1.0  0.0 ]
(%o59)              [[1.0, 1.0], [          ], false]
                                 [ 0.0  1.0 ]
(%i60) zgeev(S,true,false);
Maxima encountered a Lisp error:

 Error in IF [or a callee]: Wrong type error

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i61) zgeev(%i*S,true,false);
                                  [ 1.0  0.0 ]
(%o61)         [[1.0 %i, 1.0 %i], [          ], false]
                                  [ 0.0  1.0 ]

Tested with Maxima 5.30.0 using GCL 2.6.8 under Windows 7 (standard installer)
Always reproducible.

Also, zgeev is NOT documented in the help file, but dgeev is. Found it's existance via google search in the feature requests.

Discussion

<< < 1 2 (Page 2 of 2)
  • Robert Dodier

    Robert Dodier - 2013-10-07

    I've pushed commit 60be33 so zgeev always creates a complex matrix even if all elements have zero imaginary part. Closing this report as fixed.

     
    • Dominik Wondrousch

      Thanks a lot. You are awesome !

       
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks