c
c     Second Edition
c     Numerical Analysis:
c     The Mathematics of Scientific Computing
c     D.R. Kincaid & E.W. Cheney
c     Brooks/Cole Publ., 1996
c     ISBN 0-534-33892-5
c     COPYRIGHT (c) 1996
c
c     Section 7.1
c
c     Derivative approximation
c     using central difference formula
c
c
c     file: ex2s71.f
c
      parameter (M=26)
      f(x) = atan(x)
c
      print *
      print *,' Derivative approximation: central difference'
      print *,' Section 7.1, Kincaid-Cheney'
      print *
      print 3,'k','h','F2','F1','d','r'
c
      a = sqrt(2.0)
      h = 1.0
c
      do 2 k=0,M
         F2 = f(a+h)
         F1 = f(a-h)
         d = F2 - F1
         r = d/(2.0*h)
         print 4,k,h,F2,F1,d,r
         h = 0.5*h
 2    continue
c
 3    format(a4,a9,a16,a15,a14,a15)
 4    format(1x,i3,5(2x,e13.6))
      stop
      end
