anchor.diff:           2 * approximation_size_c * dim_c + 5 * dim_c + &
            11 * approximation_size_c ** 2 + 8 * approximation_size_c &
            )
  -    ! Other locals
  -    real(dp) :: step_length, f_delta
   
       !print *, 'lbfgsb_c.f03:lbfgsb_minimize('
       !print *, '  func:', c_associated(func)
  
positive.code:        ! Copy task message into status message
         call convert_f_c_string(message, status_message_c, status_message_length_c)
      else
         ! There was a problem computing the objective or the gradient.
         ! The error message and code were already properly set by the
         ! call to function/gradient.  Fill C types with zeros so callers
         ! do not act unwittingly on garbage.
         min_x_c = 0d0
         min_f_c = 0d0
         min_g_c = 0d0
  
negative.code:        case ('WARNING')
            ! TODO handle warnings
         case ('NEW_X')
            ! Call the logging function
            status_c = call_logging_function( &
                 log_function, log_function_callback_data, &
                 point, func_value, grad_value, g_tolerance_c, &
                 int_state, real_state, status_message_c)
            ! Terminate optimization on any error
            if (status_c /= LBFGSB_STATUS_SUCCESS) exit
         end select
      end do
      ! End optimization
  