toms748_solve requires const double on the place of upper solution bound and because of this the value can not be changed after definition, I think.