bug-gsl
[Top][All Lists]
Advanced

[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: Johannes Marbach
Subject: Re: [Bug-gsl] Possible bug in error handling of gsl_sf_bessel_Knu_e
Date: Fri, 29 Jul 2011 14:51:36 +0200

Ok, I see. So I have to disable the default error handler to be able to
catch the return codes. Sorry, I actually read the section of the manual you
are refering to, but I must have missed that fact.

Thanks for helping out.

Johannes


2011/7/29 Alejandro Cámara Iglesias <address@hidden>

> 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
>>
>
>


reply via email to

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