anchor.diff:      integer :: j
       integer :: keep
   
  -    double precision :: newx(VARS)
  -    double precision :: xbefore(VARS)
  -    double precision :: delta(VARS)
  -    double precision :: steplength
  -    double precision :: fbefore
  -    double precision :: newf
  -    double precision :: tmp
  +    real(DP) :: newx(VARS)
  +    real(DP) :: xbefore(VARS)
  +    real(DP) :: delta(VARS)
  +    real(DP) :: steplength
  +    real(DP) :: fbefore
  +    real(DP) :: newf
  +    real(DP) :: tmp
   
       do i = 1, nvars
           xbefore(i) = startpt(i)
  
positive.code:     f = c + ((1.0 - a) * (1.0 - a))
  #else
  ! Woods -- a la More, Garbow & Hillstrom (TOMS algorithm 566).
      double precision :: s1
      double precision :: s2
      double precision :: s3
      double precision :: t1
      double precision :: t2
      double precision :: t3
      double precision :: t4
      double precision :: t5
  
      funevals = funevals + 1
  
  
negative.code:     ! Function prototypes.
      interface
          ! The objective function f(x,n).
          real(kind(1.d0)) function f(x, n)
              real(kind(1.d0)), intent(in)     :: x(:)
              integer, intent(inout), optional :: n
          end function f
  
          ! The helper function best_nearby(...).
          real(kind(1.d0)) function best_nearby(delta, point, prevbest, nvars)
              real(kind(1.d0)), intent(inout) :: delta(:)
              real(kind(1.d0)), intent(inout) :: point(:)
              real(kind(1.d0)), intent(in)    :: prevbest
              integer, intent(in)             :: nvars
          end function best_nearby
  
          ! The main optimization function hooke(...).
          integer function hooke(nvars, startpt, endpt, rho, epsilon, itermax)
              integer, intent(in)           :: nvars
              real(kind(1.d0)), intent(in)  :: startpt(:)
              real(kind(1.d0)), intent(out) :: endpt(:)
              real(kind(1.d0)), intent(in)  :: rho
              real(kind(1.d0)), intent(in)  :: epsilon
              integer, intent(in)           :: itermax
          end function hooke
      end interface
  end module proto__
  
  ! === The user-supplied objective function f(x,n).
  real(DP) function f(x, n)
      use proto__, only: DP, funevals
  
      implicit none
  
      ! Returns: The objective function value.
  
      ! Arg. The point at which f(x) should be evaluated.
      real(DP), intent(in) :: x(:)
  
      ! Arg. The number of coordinates of x.
      integer, intent(inout), optional :: n
  
  #ifndef WOODS
  ! Rosenbrock's classic parabolic valley ("banana") function.
      real(DP) :: a
      real(DP) :: b
      real(DP) :: c
  
      funevals = funevals + 1
  
  