bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] Mislabeled error in gsl_integration_qag


From: Frank Reininghaus
Subject: Re: [Bug-gsl] Mislabeled error in gsl_integration_qag
Date: Mon, 3 Mar 2008 14:30:39 +0100

Hi Ivaylo,

2008/3/3, Ivaylo Popov <address@hidden>:
>
> 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.


I think the problem is that you swapped the arguments 'limit' and 'key' in
the call to gsl_integration_qag (). The 'limit' argument (INTS in your case)
comes before the 'key' (1 in your case), see

http://www.gnu.org/software/gsl/manual/html_node/QAG-adaptive-integration.html

It should work all right if you replace your call to the integrator by

gsl_integration_qag (&F, 0, 0.0000001744, 0, 1e-7, INTS, 1, w, &result,
&error);

The strange thing is that I don't get any error with your program, and
swapping INTS and 1 doesn't change the result and error at all for me.

Regards,
Frank


reply via email to

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