Skip to content

Commit 59a6aa4

Browse files
authored
Merge pull request #49 from martin-c/master
add missing parentheses to Newton's method description
2 parents 5db7ce8 + 3859bc6 commit 59a6aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ch04-logic-and-recursion.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ will call +a+. +nth_root/3+ works as follows:
167167
* Calculate +f+ as +(a^n^ - x)+
168168
* Calculate +f_prime+ as +n * a^(n - 1)^+
169169
* Calculate your next approximation (call it +next+) as +a - f / f_prime+
170-
* Calculate the change in value (call it +change+) as the absolute value of +next - a+
170+
* Calculate the change in value (call it +change+) as the absolute value of +(next - a)+
171171
* If the +change+ is
172172
less than some limit (say, 1.0e-8), stop the recursion and return
173173
+next+; that's as close to the root as you are going to get.

0 commit comments

Comments
 (0)