d01ubc returns the Gaussian quadrature approximation for the specific problem . The degrees of precision catered for are: , , , , , , , and , corresponding to values of , , , , , , , and , where is the number of weights.
f (const double x[],double fv[],Integer n,Nag_Comm *comm,Integer *istop)
1: – const doubleInput
On entry: the points at which the integrand function must be evaluated.
2: – doubleOutput
On exit: must contain the value of the integrand evaluated at the point , for .
3: – IntegerInput
On entry: n specifies the number of weights and abscissae to be used.
4: – Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to f.
user – double *
iuser – Integer *
p – Pointer
The type Pointer will be void *. Before calling d01ubc you may allocate memory and initialize these pointers with various quantities for use by f when called from d01ubc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
5: – Integer *Input/Output
On entry: .
On exit: you may set istop to a negative number if at any time it is impossible to evaluate the function . In this case d01ubc halts with fail set to the value of istop and the value returned in ans will be that of a non-signalling NaN.
2: – IntegerInput
On entry: n specifies the number of weights and abscissae to be used.
Constraint:
, , , , , , , or .
3: – double *Output
On exit: if NE_NOERROR, ans contains an approximation to the integral. Otherwise, ans will be a non-signalling NaN.
4: – Nag_Comm *
The NAG communication argument (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
5: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_USER_STOP
The user has halted the calculation.
7Accuracy
The weights and abscissae have been calculated using quadruple precision arithmetic.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.