changes to routines.cpp

23-10-2014 made a few changes..onlt the line that evaluates the function at a given point has an error right now..must be fixed soon..