"Polish" a root using Newton Raphson. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.
"Polish" a root using a complex Newton Raphson method. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n |
degree of polynomial |
||
real(kind=wp), | intent(in), | dimension(n+1) | :: | p |
vector of coefficients in order of decreasing powers |
|
real(kind=wp), | intent(inout) | :: | zr |
real part of the zero |
||
real(kind=wp), | intent(inout) | :: | zi |
imaginary part of the zero |
||
real(kind=wp), | intent(in) | :: | ftol |
convergence tolerance for the root |
||
real(kind=wp), | intent(in) | :: | ztol |
convergence tolerance for |
||
integer, | intent(in) | :: | maxiter |
maximum number of iterations |
||
integer, | intent(out) | :: | istat |
status flag: |
"Polish" a root using a complex Newton Raphson method. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n |
degree of polynomial |
||
complex(kind=wp), | intent(in), | dimension(n+1) | :: | p |
vector of coefficients in order of decreasing powers |
|
real(kind=wp), | intent(inout) | :: | zr |
real part of the zero |
||
real(kind=wp), | intent(inout) | :: | zi |
imaginary part of the zero |
||
real(kind=wp), | intent(in) | :: | ftol |
convergence tolerance for the root |
||
real(kind=wp), | intent(in) | :: | ztol |
convergence tolerance for |
||
integer, | intent(in) | :: | maxiter |
maximum number of iterations |
||
integer, | intent(out) | :: | istat |
status flag: |