bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] [Fwd: Re: [Help-gsl] Error reporting question]


From: Sebastian . Meuren
Subject: [Bug-gsl] [Fwd: Re: [Help-gsl] Error reporting question]
Date: Wed, 27 Apr 2011 08:59:53 +0200
User-agent: SquirrelMail/1.4.18

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" <address@hidden>
Date:    Wed, April 27, 2011 12:37 am
To:      address@hidden
Cc:      address@hidden
--------------------------------------------------------------------------

At Tue, 19 Apr 2011 15:11:27 +0200,
address@hidden 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 address@hidden Thanks.

Brian Gough









reply via email to

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