IMSL_ERR_ABS, floaterr_abs (Input) Absolute accuracy desired. Default: , where ɛ is the machine precision.
IMSL_ERR_REL, floaterr_rel (Input) Relative accuracy desired. Default: , where ɛ is the machine precision.
IMSL_ERR_EST, float*err_est (Output) Address to store an estimate of the absolute value of the error.
IMSL_MAX_SUBINTER, intmax_subinter (Input) Number of subintervals allowed. Default: max_subinter = 500
IMSL_N_SUBINTER, int*n_subinter (Output) Address to store the number of subintervals generated.
IMSL_N_EVALS, int*n_evals (Output) Address to store the number of evaluations of fcn.
IMSL_FCN_W_DATA, floatfcn(floatx, floaty, void*data), void*data (Input) User supplied function to be integrated, which also accepts a pointer to data that is supplied by the user. data is a pointer to the data to be passed to the user-supplied function. See Passing Data to User-Supplied Functions in the introduction to this manual for more details.
IMSL_GCN_W_DATA, floatgcn(floatx, void*data), void*data (Input) User supplied function to evaluate the lower limit of the inner integral, which also accepts a pointer to data that is supplied by the user. See Passing Data to User-Supplied Functions in the introduction to this manual for more details.
IMSL_HCN_W_DATA, floathcn(floatx, void*data), void*data (Input) User supplied function to evaluate the upper limit of the inner integral, which also accepts a pointer to data that is supplied by the user. data is a pointer to the data to be passed to the user-supplied function. See Passing Data to User-Supplied Functions in the introduction to this manual for more details.
Description
The function imsl_f_int_fcn_2d approximates the two-dimensional iterated integral
An estimate of the error is returned in err_est. The lower-numbered rules are used for less smooth integrands while the higher-order rules are more efficient for smooth (oscillatory) integrands.
Examples
Example 1
In this example, compute the value of the integral
printf("integral = %10.3f\nexact = %10.3f\n", q, exact);
}
float fcn(float x, float y)
{
return y * cos(x+y*y);
}
float gcn(float x)
{
return 1.0;
}
float hcn(float x)
{
return 3.0;
}
Output
integral = -0.514
exact = -0.514
Example 2
In this example, compute the value of the integral
The values of the actual and estimated error are printed as well. Note that these numbers are machine dependent. Furthermore, the error estimate is usually pessimistic. That is, the actual error is usually smaller than the error estimate, as is the case in this example. The number of function evaluations also is printed.