We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed05e2 commit a9b1f89Copy full SHA for a9b1f89
Maths/SquareRoot.js
@@ -6,7 +6,7 @@
6
* Finding the square root of a number using Newton's method.
7
*/
8
9
-function sqrt (num, precision = 10) {
+function sqrt (num, precision = 4) {
10
if (!Number.isFinite(num)) { throw new TypeError(`Expected a number, received ${typeof num}`) }
11
if (!Number.isFinite(precision)) { throw new TypeError(`Expected a number, received ${typeof precision}`) }
12
let sqrt = 1
0 commit comments