Variable metric nonlinear function minimization with bounds