anchor.diff:      upper_bounds = upper_bounds_c
       point = initial_point_c
   
  -    ! Translate f_tolerance to f_factor
  -    f_factor = f_tolerance / 0d0  ! TODO
  -
  -    ! Translate debug_c to print_control
  -    print_control = debug_c  / 0  ! TODO
  +    ! Translate f_tolerance to f_factor.  The convergence tolerance for
  +    ! the objective function is computed by the L-BFGS-B code as
  +    ! f_factor * epsilon(1d0) but I want to express the tolerance in
  +    ! terms of digits of precision, analogous to g_tolerance.
  +    f_factor = f_tolerance_c / epsilon(1d0)
  +
  +    ! Translate debug_c (zero-based verbosity indicator) approximately
  +    ! to print_control (general signed integer with meaning attached to
  +    ! certain values)
  +    print_control = debug_c - 1
   
       ! Initialize the task
       task = 'START'
  
positive.code:     end do
  
      ! Analyze task and error state to see how to return
      ! TODO
  
      ! Convert outputs from Fortran types to C types
      min_x_c = point
      min_f_c = func_value
      min_g_c = grad_value
      error_code_c = 0
    end function lbfgsb_minimize
  
  end module lbfgsb_c
  
negative.code: contains
  
    ! L-BFGS-B
    ! TODO document
    function lbfgsb_minimize( &
         ! Callbacks
         func, grad, callback_data, &
  