Learning by Example: Newton's Method
In this lesson, you will learn how to calculate the square root of a number using Newton's Method. We will then go over its implementation in Scala.
In this lesson, we will define a function which will calculate the square root of a given number. The implementation of the function will be based on Newton’s Method.
Newton’s Method
Newton’s method is used for approximating solutions. It is an iterative process and starts with an initial estimate which is used to find a better approximation which is then further used to find a better approximation until we reach the required result.