Initial commit of functions from github.com/btracey/optimize

`return math.Abs(currGrad) < gradConst*math.Abs(initGrad)`