Solution (source code)

= Solution

The <Newton root-finding iteration> is
$$
\boxed{g(x)=x-\frac{f(x)}{f'(x)}.}
$$
It requires $f$ and its <derivative> to be defined at the current point, and requires $f'(x)\ne0$. A step can leave the domain, making a subsequent iteration undefined. In <floating-point arithmetic>, division by zero, overflow or non-finite function evaluations can also prevent a usable step. At a root where $f'$ is zero the displayed quotient itself remains undefined unless the implementation stops before evaluating it.