public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gert Van den Eynde <gvdeynde@sckcen.be>
To: Steve Martin <spm@zippy.physics.niu.edu>
Cc: gsl-discuss@sources.redhat.com
Subject: Re: problem with gsl_eigen_hermv(), possibly due to bug in gsl_linalg_complex_householder_transform()
Date: Thu, 17 Oct 2002 00:11:00 -0000	[thread overview]
Message-ID: <20021017091123.43d1b914.gvdeynde@sckcen.be> (raw)
In-Reply-To: <Pine.LNX.4.44.0210151614070.20063-200000@zippy.physics.niu.edu>

Hi,

Just to let you know I can reproduce this behaviour. I think we can classify this as a bug. I'll try to have a look at it later (I don't have my Golub and Van Loan at hand here), but if someone else has a solution, feel free....


Bye,

Gert


On Tue, 15 Oct 2002 17:26:32 -0500 (CDT)
Steve Martin <spm@zippy.physics.niu.edu> wrote:

> Hi,
> 
> I think there may be a bug in gsl 1.2 which affects the computation of
> eigenvectors of Hermitian matrices using gsl_eigen_hermv(), but quite
> possibly other things too.
> 
> Everything works fine except when the Hermitian matrix has some zero
> entries. Then the eigenvectors returned are NaN in one or more entries.  
> In particular, the bug always seems to arise when the original matrix is
> diagonal.
> 
> Attached is a small program which illustrates the problem for the 3x3
> matrices {{2,0,0},{0,3,0},{0,0,4}} and {{2,1,0},{1,2,0},{0,0,4}} and
> {{2,0,1},{0,3,0},{1,0,4}}. In contrast, I have checked that Hermitian
> matrices with generic non-zero entries do not see the problem. Also, not
> all matrices with some zero entries have a problem, for example
> {{2,0,0},{0,3,x},{0,x,4}} is handled correctly for any non-zero value of
> x.
> 
> I do not have a patch, but I think the problem may be as follows:
> gsl_eigen_hermv() in eigen/hermv.c calls the function
> gsl_linalg_hermtd_decomp() in linalg/hermtd.c, which in turn calls
> gsl_linalg_complex_householder_transform() in linalg/householdercomplex.c 
> In the latter function, the variable beta_r is divided by, but it seems 
> to be 0 in the bad cases mentioned above. 
> 
> Information on my setup:
> I am using gsl 1.2, compiled without optimization. To be specific,
> I changed -O2 to -O0 on lines 1268 and 1274 of configure. Otherwise,
> the install was the generic one: make check produced no failures.
> My hardware is a dual pentium III running Linux kernel 2.4.9-34smp.
> The output of gcc -v is:
> gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)
> (I'm running standard Red Hat 7.2 with all updates applied.)
> 
> I'll be happy to try to provide more info if needed. 
> 
> Thanks in advance for whatever you can tell me about this,
> Steve Martin
> 

  reply	other threads:[~2002-10-17  7:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 15:26 Steve Martin
2002-10-17  0:11 ` Gert Van den Eynde [this message]
2002-10-17  9:37   ` Brian Gough
2002-10-18  9:13     ` Steve Martin
2002-10-18 14:55       ` [Bug-gsl]Re: " Steve Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021017091123.43d1b914.gvdeynde@sckcen.be \
    --to=gvdeynde@sckcen.be \
    --cc=gsl-discuss@sources.redhat.com \
    --cc=spm@zippy.physics.niu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).