next up previous index
Next: C300 Error Function Up: CERNLIB Previous: C209 Zeros of

C210 Number of Zeros of a Complex Function

Routine ID: C210
Author(s): Library: MATHLIB
Submitter: Submitted: 07.06.1992
Language: FortranRevised:

Function subprogram NZERFZ calculates the number of zeros of a complex function f(z) inside a closed polygon in the complex z-plane. f(z) must be analytic inside this polygon.

Structure:

FUNCTION subprogram
User Entry Names: NZERFZ
Files Referenced : Unit 6
External References: MTLMTR (N002), ABEND (Z035), User-supplied FUNCTION subprogram

Usage:

In any arithmetic expression, NZERFZ(F,ZP,N)

has a value equal to the number of zeros inside the defined polygon.

F
Name of a user-supplied FUNCTION subprogram, declared EXTERNAL in the calling program. This subprogram must set F(Z)= f(Z) .
ZP
One-dimensional array of length N containing the vertices of the polygon in the z-plane.
N
Number of vertices.
F, ZP and Z (in F) are of type COMPLEX*16 on computers other than CDC or Cray, and of type COMPLEX on CDC and Cray computers.

Method:

The logarithmic residual (winding number) of f(z) is found by integrating f'(z)/f(z) numerically along the edges of the polygon.

Notes:

No zero or singularity of f(z) should lie on or too near the polygon. The edges of the polygon should not cross each other. Numerically unstable functions (e.g. polynomials of high degree) can result in unreliable values or in timing problems.

Error handling:

Error C210.1: The integration is not successful. This often indicates that the polygon passes through or too near to a zero or singularity. The function value is set to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

C300



next up previous index
Next: C300 Error Function Up: CERNLIB Previous: C209 Zeros of


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995