steepest decent method in c++ and a github test