[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] possible bug in GSL

From: Gunjan Verma
Subject: Re: [Bug-gsl] possible bug in GSL
Date: Thu, 11 Feb 2010 11:13:01 -0500

 Actually, I did not know what "IEEE" Comparisons were. I had to manually
write the "configure.h" file since I could not build gsl on the system
directly. As a result, I set that flag (and the isnan, which I surely did
not have since I checked it on the target system ) to 0. I was able to build
GSL but had problems with gsl_isnan not being defined at run time.

 Subsequently, I did find that IEEE comparisons worked and set this flag to
1 in configure.h. Now all is well.

I guess the end result of this is that I still feel there is a "logical" gap
in that the GSL runtime assumes the presence of gsl_isnan , but there is a
theoretical possibility at least, that it does not get defined at build time
(if both flags are 0).  I think the solution to close this gap would be to
refuse to build GSL if both
"have_isnan" and "have_ieee comparisons" are set to 0.

Practically, I do understand that this is not really an issue . This is more
for just logical correctness than anything else.

Once again, thanks for your work on GSL and for your timely replies - it is
truly a  fantastic product!


On Tue, Feb 9, 2010 at 12:15 PM, Brian Gough <address@hidden> wrote:

> At Tue, 2 Feb 2010 10:14:12 -0500,
> Gunjan Verma wrote:
> >       I have found a potential bug in GSL, in the "infnan.c" file
> > I am building GSL for an embedded system which does not have isnan
> > nor IEEE comparisons, so both of those flags are 0 . As a result,
> > based on the #if and #elif statements both being false, I believe
> > that the function gsl_isnan does not get defined, because I am
> > getting "undefined reference to gsl_isnan" being generated by svd.c
> > when I try to use the svd .
> Thanks for your email.  I can see how that might be a problem.
> From my side, it's not clear how to test for NaN if there is no isnan
> function and IEEE comparisons do not work (i.e. if it's not possible
> to test for NaN by checking if x!=x).
> Is NaN actually supported on this platform and if so how would you
> test for it?
> The SVD checks for NaNs to avoid getting into an infinite loop with
> bad data.  If you only work with safe matrices it might not be
> necessary.
> --
> Brian Gough
> GNU Scientific Library -
> http://www.gnu.org/software/gsl/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]