Name

root

Synopsis

int root(double (*f)(double x), double (*g)(double x), double *x, int *n, 
    double delta)

Return Value

0 if a root is found, -1 otherwise.

Description

Computes the root of f to which Newton’s method converges given an initial iteration point. This point is specified in x[0]. The derivative of f is specified in g. The argument n is the maximum number of iterations to perform. The argument delta is the difference between successive approximations at which to stop iterating. Upon return, successive values of x calculated during the iteration process are returned in the x array. Upon return, n contains the number of values in array x. It is the responsibility of the caller to manage the storage associated with x.

Complexity

O (n), where n is the maximum number of iterations the caller wishes to perform.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.215.117