Made string to int or double method. Compatible with approxSolve.