Made NthRootNewtonRaphsonSolver and LogarithmNewtonRaphsonSolver thread safe