[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Possible bug in error handling of gsl_sf_bessel_Knu_e
From: |
Alejandro Cámara Iglesias |
Subject: |
Re: [Bug-gsl] Possible bug in error handling of gsl_sf_bessel_Knu_e |
Date: |
Fri, 29 Jul 2011 14:37:07 +0200 |
I think that's the right behaviour.
If you want to disable the error handler (in order to manage yourself the
errors) you can use [1]:
gsl_error_handler_t * *gsl_set_error_handler_off* ()
Alternatively, you can use your own error handler by using:
gsl_error_handler_t * *gsl_set_error_handler* (gsl_error_handler_t *
new_handler)
Please refer to [1]:
http://www.gnu.org/s/gsl/manual/html_node/Error-Handlers.html
I hope it helps!
*Alejandro Cámara*
PhD Student of the GICO <http://www.ucm.es/info/giboucm/>
2011/7/29 Johannes Marbach <address@hidden>
> Hi.
>
> When I'm calling gsl_sf_bessel_Knu_e with rather large arguments the
> program
> immediately invokes the default error handler without allowing me to check
> the return code. As far as I understood this isn't the intended behaviour,
> or is it?
>
> Here's my sample program's source code
>
> #include <stdio.h>
> #include <gsl/gsl_sf_bessel.h>
>
> int main () {
> gsl_sf_result res;
> int rc = gsl_sf_bessel_Knu_e (2.5, 2000, &res);
> printf ("%i\n", rc);
> printf ("%e\n", res.val);
> printf ("%e\n", res.err);
>
> return 0;
> }
>
> After compiling and running the program I receive
>
> address@hidden gsl]$ gcc -lgsl -lgsl -lgslcblas -lm bessel.c
> address@hidden gsl]$ ./a.out
> gsl: exp.c:257: ERROR: underflow
> Default GSL error handler invoked.
> Aborted
>
> I'm using GSL 1.15 on Arch Linux.
>
> Regards
> Johannes
> _______________________________________________
> Bug-gsl mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-gsl
>