      program newton
      implicit real*8 (a-h,o-z)
      x = 0.0
      do 10 i=1,5
        call funobj(x,f,g,h)
        x = x - g/h
        write(6,9999) x,f,g,h
   10 continue
 9999 format(x,10f10.4)
      end
      subroutine funobj(x,f,g,h)
      implicit real*8 (a-h,o-z)
      double precision x,g
      f = dexp(0.03-0.03*x+0.0004*x**2.0)
      g = (-0.03+0.0008*x)*f
      h = 0.0008*f + ((-0.03+0.0008*x)**2)*f
      end
     