Dear GSL-developer,

I want to submit this bug-report. I used this code to perform an integration

#include <stdio.h>
#include <math.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_errno.h>

double f (double x, void * params) {
        GSL_ERROR("test error",GSL_FAILURE);
        return GSL_NAN;
}



int main (void)
{
gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000);

double result, error;

gsl_function F;
F.function = &f;

gsl_set_error_handler_off();
int status = gsl_integration_qags (&F, 0, 1, 0, 1e-7, 1000,
                     w, &result, &error);

printf ("status          = %d\n", status);
status  = GSL_FAILURE;
printf ("status          = %d\n", status);


gsl_integration_workspace_free (w);

return 0;
}

However, the integration returns 0 on my system (I use GSL 1.14 compiled
from source on an ubuntu 10.10 machine.

Best,

Sebastian Meuren



---------------------------- Original Message ----------------------------
Subject: Re: [Help-gsl] Error reporting question
From:    "Brian Gough" <[email protected]>
Date:    Wed, April 27, 2011 12:37 am
To:      [email protected]
Cc:      [email protected]
--------------------------------------------------------------------------

At Tue, 19 Apr 2011 15:11:27 +0200,
[email protected] wrote:
>
> Dear GSL-users,
>
> I posed the following question
>
> http://stackoverflow.com/questions/5716288/gsl-error-reporting.
>
> However, there seems only little activity concerning GSL questions.
> Therefore I also ask here.  Does anybody has a good answer?
>

To stop an integration with qags try returning NaN from the integrand.
If it does not work please report it to [email protected]. Thanks.

Brian Gough







_______________________________________________
Bug-gsl mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to