diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-10-30 19:07:43 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-10-30 19:07:43 -0600 |
commit | 562ba9a9b6efd8cc27fc506f83b1125c2cfa4619 (patch) | |
tree | f801276f9332462084966ee731e2e90c0f180cb2 /notes/Oct-27.org | |
parent | 81979f09cf100db32deb0e1917dabb1fe435194c (diff) | |
download | cmath-562ba9a9b6efd8cc27fc506f83b1125c2cfa4619.tar.gz cmath-562ba9a9b6efd8cc27fc506f83b1125c2cfa4619.zip |
hw 5
Diffstat (limited to 'notes/Oct-27.org')
-rw-r--r-- | notes/Oct-27.org | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/notes/Oct-27.org b/notes/Oct-27.org new file mode 100644 index 0000000..6d23576 --- /dev/null +++ b/notes/Oct-27.org @@ -0,0 +1,26 @@ +Use a bisection criterion for a start + +Hybrid Method: combine Bisection and Higher Order Method: +- Newton's Method +- Secant Method (Newton's method with secant approx.) + + +#+BEGIN_SRC c +fa = f(a) +fb = f(b) +if (fa * fb >= 0) return + +error = 10 * tol +iter = 0 + +while (error > tol && iter < maxiter) { +x0 = 0.5 * (a + b) +x1 = x0 - f(x0) / f'(x0) +if (abs(x1 - x0) > 0.5 * (b - a)) { +// do bisection +} else{ +// do newton's method +} +} +#+END_SRC + |