On entry: the point at which the function must be evaluated.
2: – 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 c05ayc you may allocate memory and initialize these pointers with various quantities for use by f when called from c05ayc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
Note:f should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by c05ayc. If your code inadvertently does return any NaNs or infinities, c05ayc is likely to produce unexpected results.
6: – double *Output
On exit: if NE_NOERROR or NE_TOO_SMALL, x is the final approximation to the zero. If NE_PROBABLE_POLE, x is likely to be a pole of . Otherwise, x contains no useful information.
7: – Nag_Comm *
The NAG communication argument (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
8: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, and have the same sign with neither equalling : and .
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.
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.
The function values in the interval might contain a pole rather than a zero. Reducing eps may help in distinguishing between a pole and a zero.
On entry, .
On entry, and .
No further improvement in the solution is possible. eps is too small: . The final value of x returned is an accurate approximation to the zero.
The levels of accuracy depend on the values of eps and eta. If full machine accuracy is required, they may be set very small, resulting in an exit with NE_TOO_SMALL, although this may involve many more iterations than a lesser accuracy. You are recommended to set and to use eps to control the accuracy, unless you have considerable knowledge of the size of for values of near the zero.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
c05ayc is not threaded in any implementation.
The time taken by c05ayc depends primarily on the time spent evaluating f (see Section 5).
This example calculates an approximation to the zero of within the interval using a tolerance of .