Change the relative convergence parameter to be scaled by the machine precision.

Also, updated the tolerance argument to use lexical cast.