      SUBROUTINE QDCRT (AC, RZ)
C     ******************************************************************
C     FORTRAN SUBROUTINE FOR ROOTS OF QUADRATIC POLYNOMIAL
C     ******************************************************************
C     AC = POLYNOMIAL COEFFICIENTS (3-ARRAY)
C     RZ = POLYNOMIAL ROOTS        (4-ARRAY)
C
      DIMENSION AC(3), RZ(4)
  001 SQ=AC(2)*AC(2)-4.0*AC(1)*AC(3)
      RQ=SQRT(ABS(SQ))
      IF(SQ)002,002,003
  002 RZ(1)=-0.5*AC(2)/AC(3)
      RZ(2)=+0.5*RQ/AC(3)
      RZ(3)=-0.5*AC(2)/AC(3)
      RZ(4)=-0.5*RQ/AC(3)
      RETURN
  003 IF(AC(2))004,004,005
  004 RZ(1)=-2.0*AC(1)/(AC(2)-RQ)
      RZ(2)=0.0
      RZ(3)=-0.5*(AC(2)-RQ)/AC(3)
      RZ(4)=0.0
      RETURN
  005 RZ(1)=-2.0*AC(1)/(AC(2)+RQ)
      RZ(2)=0.0
      RZ(3)=-0.5*(AC(2)+RQ)/AC(3)
      RZ(4)=0.0
      RETURN
      END
