From bug-octave-request at bevo dot che dot wisc dot edu Sun Nov 3 05:38:14 2002 Subject: chol problem From: Rolf Fabian To: "'bug-octave UWISC'" Date: Sun, 3 Nov 2002 13:34:33 +0100 There seems to be a bug in the Cholesky decomposition chol(A) for input of complex diagonal matrices A. In my opinion, a positive definite DIAGONAL matrix must always be real (with strictly positive elements). As a consequence, if diagonal A has any nonvanishing imag parts, 'chol' should always return an error. (1) This call correctly invokes an error: :> C = chol( A=diag( [-1+i,1+i] ) ) |- error: chol: matrix not positive definite (2) But a bug occurs e.g. for: :> C = chol( A=diag( [+1+i,1+i] ) ) # No error! C = 1 0 0 1 :> RES = C'*C - A # residuals, approx. ZERO expected # if C is a Cholesky factor RES = 0 - 1i 0 + 0i 0 + 0i 0 - 1i If ALL real parts of A are (strictly) positive, Octave's 'chol' doesn't detect, that A is actually NOT positive definite. Hence the resulting C is garbage as can be easily seen in our example by the nonvanishing RES matrix. I use V2.1.14, ported to OS/2 by K. Gebhardt. This is a bit exotic. Probably, the problem does not occur on other platforms, or has been corrected in later versions. Rolf Fabian Brandenburg University of Technology Cottbus Dep. of Air Chemistry and Pollution Control ************************************************* * JOB SEARCH ( 2002-Nov-01 ) * --------------------------------------------------------- * PhD 1988 MPI Nuclear Physics Heidelberg / FRG * KEYWORDS * - experimental and computational physics, * optics, UV laser techniques, spectroscopy, * mass spectrometry * - cosmic physics, planetary atmospheres, * chemical physics, atmospheric chemistry, * ionosphere, ion - molecule - reactions * - C/C++, FORTRAN, Octave/Matlab, IDL, Pascal * - besides Germany, working experience in * France, Norway , Sweden, Greece ************************************************* Current email address will be obsolete in the near future: Tel. (49)-(0)355-793314 ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------