[Top][All Lists]

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

Re: [Bug-gsl] bug in gsl_eigen_hermv

From: Matthew B. Hastings
Subject: Re: [Bug-gsl] bug in gsl_eigen_hermv
Date: Mon, 12 Nov 2007 19:43:43 -0700 (MST)
User-agent: SquirrelMail/1.4.8-6.el3.2lanl

Hi Brian,

I inserted gsl_ieee_env_setup() at the start of the program and ran under
gdb.  I tried set env GSL_IEEE_MODE double-precision and got

gsl: fp-darwin.c:35: ERROR: powerpc only supports default precision rounding
Default GSL error handler invoked.

I then tried it with set env GSL_IEEE_MODE round-to-nearest and got

gsl: fp-darwin.c:70: ERROR: powerpc does not support the denormalized
operand exception. Use 'mask-denormalized' to work around this.
Default GSL error handler invoked.

so I also tried set env GSL_IEEE_MODE mask-denormalized.  In this case,
the program ran, returning the nans, but without trapping any floating
point exception.  I have not used gsl_ieee_env_setup() to do this before,
so please let me know if I am doing anything wrong.  I compiled the code
with the -g flag.

I did some more checking on different versions of gsl, and it seems like
it is not just an architecture dependent problem, but maybe also a
compiled dependent problem.  I rebuilt gsl-1.4 in a different directory,
and after rebuilding gsl-1.4 I got nan with that one too.  However, the
old version of gsl-1.4 (that I built some time ago, when gsl-1.4 was the
latest release) does not gives nan when I run this code.  There are a few
differences in how it was built, mainly now I have gcc 4.0 installed as
that is now the default compiled on OS X, and the previous library was
built under gcc 3.3.  Also, slight update in the version of OS X from
10.4.3 (or something around that) to 10.4.9.  I can try rebuilding gsl-1.4
with gcc 3.3 and see if that gets rid of the bug.  In both cases, I
configured the library with ./configure --non-shared.

Matt Hastings

> At Sat, 10 Nov 2007 09:05:46 -0700 (MST),
> Matthew B. Hastings wrote:
>> I think there is a bug in gsl_eigen_hermv which causes it to give nan if
>> there ar many very small entries or entries equal to zero.  I checked
>> the
>> bug archives, and I found a similar bug report,
>> http://lists.gnu.org/archive/html/bug-gsl/2002-10/msg00002.html , for
>> gsl-1.2.  However, I am using gsl-1.10.  The bug does not seem to appear
>> on gsl-1.4.  I am using Mac OS X 10.4.9 on a PowerPC G4.
> Thanks for your bug report.
> It seems to be an architecture dependent problem, I'm not able to
> reproduce the NaNs on x86 or x86_64.
> Is is possible for you to identify where the NaNs are coming from? e.g
> by trapping any division by zero, overflow and invalid operation
> exceptions while running under GDB.  The function gsl_ieee_env_setup()
> can be used to enable these.
> --
> Brian Gough
> Network Theory Ltd,
> Publishing Free Software Manuals --- http://www.network-theory.co.uk/

reply via email to

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