Newton's method implemented for math-numbers