This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
As I said in a previous response that got bounced by the redhat mailer daemon, one of the problems that is causing the eigen tests to fail is a problem with the call to gsl_matrix_complex_const_column in the test routine, which is supposed to retrieve an eigenvector from the matrix of eigenvectors to test whether the eigenvector and associated eigenvalue are solutions to m*v = lambda*v. However, gsl_matrix_complex_const_column doesn't do what it is supposed to do, and what it returns is not actually a column vector of the matrix of eigenvectors. However, if the lines gsl_vector_complex_const_view vi = gsl_matrix_complex_const_column(evec, i); gsl_vector_complex_memcpy(x, &vi.vector); are replaced with for (j=0; j<N; ++j) gsl_vector_complex_set(x,j,gsl_matrix_complex_get(evec,j,i)); the eigenvector is correctly copied into the vector x, and the tests pass. (I have attached a source file where this change has been made). Unfortunately, this is not the end of the story. Even though the tests pass, inspection of the values of the elements of the eigenvalues and eigenvectors, and comparison with independently obtained eigenvalues and eigenvectors for the same matrix, reveals that all four eigenvalues are correct, but two of the eigenvectors have incorrect values in some of the elements. These two eigenvectors should be as follows 0 0 0.5257 0.8507 0 0 -0.8507 0.5257 However, the eigenvectors returned by gsl_eigen_hermv have values of NaN where the non-zero elements should be. The tests pass only because of the specific properties of the test matrix, not because they are correct solutions. I haven't had a chance to look into where the problem occurs in gsl_eigen_hermv, but when I run the test routine with the modification described above, using gsl libraries built with gcc 2.95, the eigenvector values appear to be correct. At 06:41 PM 4/15/2002 +0100, Brian Gough wrote: >John Ketchum writes: > > Here is a paired-down version of the "test.c" in the eigen > subdirectory of > > the source tree. This checks the eigenvalues of a single 4x4 complex > > matrix, When gsl-1.1 is compiled with gcc 2.96-98, a number of the checks > > fail-- some of the failures appear trivial, i.e. a very small number with > > not quite the right value, but there are also some clearly catastrophic > > failures. > >A program which shows the bug indenpedently of gsl would be ideal -- >stepping through the existing program should show the point at which >the eigenvector data becomes corrupted within the library. John Ketchum Qualcomm Inc. 9 Damonmill Square Suite 2A Concord, MA 01742 Office: 60915 Direct: 781-276-0915 Fax: 781-276-0901 Mobile: 617-312-7023
Attachment:
test.c
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |