public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gert Van den Eynde <gvdeynde@sckcen.be>
To: Przemyslaw Sliwa <sliwa@euv-frankfurt-o.de>
Cc: gsl-discuss@sources.redhat.com
Subject: Re: Determinant of a matrix
Date: Tue, 22 Oct 2002 07:20:00 -0000	[thread overview]
Message-ID: <20021022121223.295320c4.gvdeynde@sckcen.be> (raw)
In-Reply-To: <3DB521DE.2020006@euv-frankfurt-o.de>


Could you send us some lines of code that gives this behaviour and some more machine/compiler specs (see the Bug reporting part in the README file).

Remark 1: If I understand correctly, you calculate a determinant of 0.5E+13 and the error between Cholesky and LU is 6.0E+1 (a relative error of about 1.0E-11). 

Remark 2: The condition number of a Hilbert matrix of size 10 x 10 is about 1.0E+10. Roughly said, if you solve a linear system using LU factorisation (Gauss) with this matrix, you can loose about 10 decimal digits in your result... With the traditional double precision (u = 2.2E-16), this leaves you with 4 digits you can trust.... Hilbert matrices are *not* nice. 

Gert


On Tue, 22 Oct 2002 12:01:02 +0200
Przemyslaw Sliwa <sliwa@euv-frankfurt-o.de> wrote:

> Hello,
> 
> The determinant of a symmetric positive definite matrix is just the
> product of the squares of the diagonal elements form the cholesky
> decomposition (NAG documentation). So why I'm getting different
> results form gsl_LU decomposition and the cholesky decomposition
> of a 10*10 Hilbert matrix (elemenst i,j given by 1/(i+j-1)).
> The results are not very big, but still they exist (determinant about 
> 0.5E+13 and
> the difference 6.0E+1). 




> Is it a bug, or the LU decomposition is unstable.
> What should be suggested: determinant of a covariance matrix: its
> Cholesky form or computation from LU decomposition.
> 
> Thanks for help
> 
> Przem
> 

  reply	other threads:[~2002-10-22 10:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22  3:12 Przemyslaw Sliwa
2002-10-22  7:20 ` Gert Van den Eynde [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-23 10:03 Przemyslaw Sliwa
2002-07-23 10:35 ` Alan Aspuru-Guzik
2002-07-23 10:44 ` Dan, Ho-Jin

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=20021022121223.295320c4.gvdeynde@sckcen.be \
    --to=gvdeynde@sckcen.be \
    --cc=gsl-discuss@sources.redhat.com \
    --cc=sliwa@euv-frankfurt-o.de \
    /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).