[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Mislabeled error in gsl_integration_qag
From: |
Ivaylo Popov |
Subject: |
[Bug-gsl] Mislabeled error in gsl_integration_qag |
Date: |
Mon, 3 Mar 2008 03:31:22 -0600 |
Greetings,
I apologize for the pathological example, but this comes directly from
a problem I am working on:
#include <math.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_math.h>
#define INTS 1000
double integrand (double theta, void * params)
{
return cos (theta) * exp ( 10 * (cos (theta) - cos
(0.0001744)) );
}
void main ()
{
gsl_integration_workspace * w =
gsl_integration_workspace_alloc (INTS);
double result, error;
gsl_function F;
F.function = &integrand;
F.params = NULL;
gsl_integration_qag (&F, 0, 0.0000001744, 0, 1e-7, 1, INTS,
w, &result, &error);
}
When I compile and execute this program, I get the error
gsl: qag.c:162: ERROR: a maximum of one iteration was insufficient
However, this error should appear only when the maximum number of
intervals is 1, and in this case it is 1000. Although I am not very
familiar with the library source, after some searching I cannot find
out how this specific error might be getting invoked. I hope someone
can help. Let me remind you of the prototype of the function,
int gsl_integration_qag (const gsl_function * f, double a, double b,
double epsabs, double epsrel, size_t limit, int key,
gsl_integration_workspace * workspace, double * result, double *
abserr);
Regards,
Ivaylo Popov
- [Bug-gsl] Mislabeled error in gsl_integration_qag,
Ivaylo Popov <=