*     C02AMF Example Program Text
*     Mark 20 Release. NAG Copyright 2001.
*     .. Parameters ..
      INTEGER          NIN, NOUT
      PARAMETER        (NIN=5,NOUT=6)
*     .. Local Scalars ..
      COMPLEX *16      R, S, T, U
      INTEGER          I, IFAIL
*     .. Local Arrays ..
      DOUBLE PRECISION ERREST(3), ZEROI(3), ZEROR(3)
*     .. External Subroutines ..
      EXTERNAL         C02AMF
*     .. Executable Statements ..
      WRITE (NOUT,*) 'C02AMF Example Program Results'
*     Skip heading in data file
      READ (NIN,*)
      READ (NIN,*) U, R, S, T
      IFAIL = 0
*
      CALL C02AMF(U,R,S,T,ZEROR,ZEROI,ERREST,IFAIL)
*
      WRITE (NOUT,*)
      WRITE (NOUT,*) ' Roots of cubic equation     ',
     +  '        Error estimates'
      WRITE (NOUT,*) '                             ',
     +  '      (machine-dependent)'
      WRITE (NOUT,*)
      DO 20 I = 1, 3
         WRITE (NOUT,99999) ' z = ', ZEROR(I), ZEROI(I), '*i', ERREST(I)
   20 CONTINUE
*
      STOP
*
99999 FORMAT (1X,A,1P,E12.4,SP,E12.4,A,8X,SS,E9.1)
      END
