[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] gsl 2.3.0 problem in gsl_integration_cquad
From: |
Rico Buchholz |
Subject: |
[Bug-gsl] gsl 2.3.0 problem in gsl_integration_cquad |
Date: |
Wed, 21 Nov 2018 11:16:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
Hello,
I found a problem in gsl (assuming the compiler/linker is not broken),
which I would consider a bug.
A minimal working example is attached.
I compiled using g++ 6.3.0 and gsl 2.3.0. The compile command is given
in the file.
The code uses an extension to cause the code to stop on floating point
exceptions (found this via stack exchange
https://linux.die.net/man/3/feenableexcept).
I would expect the code to just run through with output something like
result: 4.39016e-164
abserr: 0
nevals: 33
Instead i get the message
Gleitkomma-Ausnahme (german for floating point exception)
Running the program with gdb I get
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff7a1b42f in gsl_integration_cquad () from
/usr/lib/x86_64-linux-gnu/libgsl.so.19
(gdb) backtrace
#0 0x00007ffff7a1b42f in gsl_integration_cquad () from
/usr/lib/x86_64-linux-gnu/libgsl.so.19
#1 0x0000555555554cee in main () at main.cpp:42
Changing the lower bound to 19.2 will cause the code to work, i.e. no
floating point exception.
If I do not trap the exception the code works as expected, but if there
is no real problem, then no exception should be raised.
With kind regards
Rico Buchholz
main.cpp
Description: Text Data