This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Return Values from gsl_linalg_LU_decomp() and gsl_linalg_LU_solve()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]