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: gsl_eigen_symmv Issue


Adam Johansen writes:
 >  I think I've stumbled across a minor issue with the error checking
 > of this function: if the matrix which this function is called with
 > contains infinite off-diagonal elements, it appears to stay in an
 > infinite loop attempting to reduce these rather than generating an
 > appropriate call to the error handler.
 >  I've attached a short piece of C which illustrates this problem.
 >  All comments gratefully received....

Thanks for the bug report.  Here is a suggested patch:

cvs server: Diffing .
Index: herm.c
===================================================================
RCS file: /cvs/gsl/gsl/eigen/herm.c,v
retrieving revision 1.4
diff -r1.4 herm.c
136c136
<           if (sd[b - 1] == 0.0)
---
>           if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1]))
Index: hermv.c
===================================================================
RCS file: /cvs/gsl/gsl/eigen/hermv.c,v
retrieving revision 1.5
diff -r1.5 hermv.c
176c176
<           if (sd[b - 1] == 0.0)
---
>           if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1]))
Index: symm.c
===================================================================
RCS file: /cvs/gsl/gsl/eigen/symm.c,v
retrieving revision 1.4
diff -r1.4 symm.c
136c136
<           if (sd[b - 1] == 0.0)
---
>           if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1]))
Index: symmv.c
===================================================================
RCS file: /cvs/gsl/gsl/eigen/symmv.c,v
retrieving revision 1.4
diff -r1.4 symmv.c
153c153
<           if (sd[b - 1] == 0.0)
---
>           if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1]))


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