This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Return Values from gsl_linalg_LU_decomp() and gsl_linalg_LU_solve()
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: banerjee at wernicke dot ccn dot upenn dot edu
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Thu, 14 Mar 2002 20:32:50 +0000 (GMT)
- Subject: Re: Return Values from gsl_linalg_LU_decomp() and gsl_linalg_LU_solve()
- References: <Pine.LNX.4.44.0203131748070.30150-100000@wernicke.ccn.upenn.edu>
banerjee@wernicke.ccn.upenn.edu writes:
>
> However, the return value from gsl_linalg_LU_decomp() is 0, indicating to
> me that "everything is all right."
The LU decomposition is valid, so this is ok.
> Then I call gsl_linalg_LU_solve() to solve a linear system, get
> NaN's in the solution vector, but once again, gsl_linalg_LU_solve()
> returns 0, which my code interprets as "everything is all right."
The solver uses the blas routine DTRSV which does not make any
distinction between the singular non-singular cases.
Errors that are flagged are things like the solution vector being the
wrong size.
Checking the result to see if it is finite is the simplest option.
Another option would be to write a separate routine which checks for
division by zero in the solution of L and U, or to estimate the
condition number.
Brian