From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27494 invoked by alias); 22 Oct 2002 10:12:43 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 27480 invoked from network); 22 Oct 2002 10:12:41 -0000 Received: from unknown (HELO relay.sckcen.be) (193.190.187.211) by sources.redhat.com with SMTP; 22 Oct 2002 10:12:41 -0000 Received: from 193.190.143.188 by relay.sckcen.be (InterScan E-Mail VirusWall NT); Tue, 22 Oct 2002 12:12:40 +0200 Received: from pc1727.sck.be ([193.190.184.23]) by mailsrv3.sck.be over TLS secured channel with Microsoft SMTPSVC(5.0.2195.5329); Tue, 22 Oct 2002 12:12:40 +0200 Received: from pc1727.sck.be (localhost [127.0.0.1]) by pc1727.sck.be (8.12.3/8.12.3/SuSE Linux 0.6) with SMTP id g9MACNIp020548; Tue, 22 Oct 2002 12:12:24 +0200 Date: Tue, 22 Oct 2002 07:20:00 -0000 From: Gert Van den Eynde To: Przemyslaw Sliwa Cc: gsl-discuss@sources.redhat.com Subject: Re: Determinant of a matrix Message-Id: <20021022121223.295320c4.gvdeynde@sckcen.be> In-Reply-To: <3DB521DE.2020006@euv-frankfurt-o.de> References: <3DB521DE.2020006@euv-frankfurt-o.de> Organization: SCK-CEN Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Oct 2002 10:12:40.0344 (UTC) FILETIME=[8DB65980:01C279B3] X-SW-Source: 2002-q4/txt/msg00066.txt.bz2 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 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 >