      DOUBLE PRECISION FUNCTION DMAG(Z)
      COMPLEX*16 Z
      DOUBLE PRECISION DIMAG,DREAL
      DMAG = DABS(DREAL(Z)) + DABS(DIMAG(Z))
      RETURN
      END
