From bug-octave-request at bevo dot che dot wisc dot edu Thu Jun 7 03:07:36 2001 Subject: Re: det() hangs on large matrix From: Christoph Spiel To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 7 Jun 2001 09:48:00 +0200 On Tue, Jun 05, 2001 at 11:33:52AM -0500, John W. Eaton wrote: > Octave uses DGEDI from Linpack to compute the determinant. The > problem is that in this loop in DGEDI, > > 30 IF (DABS(DET(1)) .LT. TEN) GO TO 40 > DET(1) = DET(1)/TEN > DET(2) = DET(2) + 1.0D0 > GO TO 30 > 40 CONTINUE > > your matrix results in DET(1) == Inf. So dividing it by TEN does not > reduce its value and its absolute value never becomes less than 10, > and the loop repeats indefinitely. What about using [D|Z]GETRF instead of DGEDI? [D|Z]GETRF only does an LU-factorization, but as det(A) = det(L U) = det(U) = u_1 * ... * u_n, we could get a determinant. -cls -- Christoph L. Spiel Hammersmith Consulting, web: www.hammersmith-consulting.com Phone: +49-8022-662908, fax: +49-8022-662909 ------------------------------------------------------------- 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 -------------------------------------------------------------