## MA01DD

### Approximate symmetric chordal metric for two finite complex numbers

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

      To compute an approximate symmetric chordal metric for two complex
      numbers A1 and A2, with Aj = ARj + i*AIj, j = 1, 2.

Specification

          SUBROUTINE MA01DD( AR1, AI1, AR2, AI2, EPS, SAFEMN, D )
    C     .. Scalar Arguments ..
          DOUBLE PRECISION  AI1, AI2, AR1, AR2, D, EPS, SAFEMN

Arguments

Input/Output Parameters

      AR1     (input) DOUBLE PRECISION
      AI1     (input) DOUBLE PRECISION
              These scalars define the real and imaginary parts of the
              number A1.

      AR2     (input) DOUBLE PRECISION
      AI2     (input) DOUBLE PRECISION
              These scalars define the real and imaginary parts of the
              number A2.

      EPS     (input) DOUBLE PRECISION
              The relative machine precision. See the LAPACK Library
              routine DLAMCH.

      SAFEMN  (input) DOUBLE PRECISION
              The "safe minimum", such that its reciprocal does not
              overflow. See the LAPACK Library routine DLAMCH.

      D       (output) DOUBLE PRECISION
              The approximate symmetric chordal metric D.  D >= 0.

Method

      The approximate symmetric chordal metric is evaluated using the
      formula

         D = MIN( | A1 - A2 |, |1/A1 - 1/A2| ).

      The chordal metric is finite even if A1 and A2 are both infinite,
      or if one of them is infinite and the other is finite, nonzero.

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index