GNU Scientific Library Reference Manual - Third Edition (v1.12)by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi Paperback (6"x9"), 592 pages, 60 figures ISBN 0954612078 RRP £24.95 ($39.95) |

## 34.5 Search Stopping Parameters

A root finding procedure should stop when one of the following conditions is true:

- A multidimensional root has been found to within the user-specified precision.
- A user-specified maximum number of iterations has been reached.
- An error has occurred.

The handling of these conditions is under user control. The functions below allow the user to test the precision of the current result in several standard ways.

__Function:__int**gsl_multiroot_test_delta***(const gsl_vector **`dx`, const gsl_vector *`x`, double`epsabs`, double`epsrel`)- This function tests for the convergence of the sequence by comparing the
last step
`dx`with the absolute error`epsabs`and relative error`epsrel`to the current position`x`. The test returns`GSL_SUCCESS`

if the following condition is achieved,|dx_i| < epsabs + epsrel |x_i|

for each component of

`x`and returns`GSL_CONTINUE`

otherwise.

__Function:__int**gsl_multiroot_test_residual***(const gsl_vector **`f`, double`epsabs`)- This function tests the residual value
`f`against the absolute error bound`epsabs`. The test returns`GSL_SUCCESS`

if the following condition is achieved,\sum_i |f_i| < epsabs

and returns

`GSL_CONTINUE`

otherwise. This criterion is suitable for situations where the precise location of the root, x, is unimportant provided a value can be found where the residual is small enough.

ISBN 0954612078 | GNU Scientific Library Reference Manual - Third Edition (v1.12) | See the print edition |