      subroutine parabola(x,y,a,b,c,xext,yext) ! bernd berg jan 10 1999.
c 3-point determination of the parabola y=a*x**2+b*x+c. the parameters 
c         a, b, c  and the extremum (minimum or maximum) abscissa xext 
c         and ordinate yext are returned.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      dimension x(3),y(3)
      a=( (y(3)-y(2))/(x(3)-x(2))-(y(3)-y(1))/(x(3)-x(1)) ) /
     & ( (x(3)**2-x(2)**2)/(x(3)-x(2))-(x(3)**2-x(1)**2)/(x(3)-x(1)) )
      b=( y(3)-y(1)-a*(x(3)**2-x(1)**2) )/(x(3)-x(1))
      c=y(1)-(a*x(1)+b)*x(1)
c extrema: 2*a*xext+b=0 =>
      xext=-half*b/a
      yext=xext*(a*xext+b)+c
      return
      end


