Permalink
Browse files

Remove print_end()

  • Loading branch information...
1 parent 2029c7c commit 35396d51e7ff8b1d350781615323ffe0f0e2d3b3 Andreas Pauley committed Sep 2, 2010
@@ -14,7 +14,6 @@ def bisection(func, a, b, max_steps=MaxSteps):
initial = result
else:
b = midPoint
- print_end()
if __name__ == '__main__':
bisection(example_f, 0, 1)
@@ -13,7 +13,6 @@ def fixed_point(func, initialApproximation, max_steps=MaxSteps, tolerance=Tolera
print "Approximate root is %.9f (found in %d steps)" % (oldP,int(loopCounter))
return
p = oldP
- print_end()
if __name__ == '__main__':
fixed_point(example_f, 1)
@@ -10,6 +10,3 @@ def example_f(x):
def example_deriv(x):
"3 + cos x - e^x"
return 3 + math.cos(x) - math.exp(x)
-
-def print_end():
- print "-" * 50
@@ -37,7 +37,6 @@ def mullers_method(func, a, b, r, max_steps=MaxSteps):
else:
x = [x[2],x[0],root]
x = swap_points(x)
- print_end()
if __name__ == '__main__':
mullers_method(example_f, 0.0, 0.5, 1.0)
@@ -13,7 +13,6 @@ def newton_raphson(func, derFunc, initialApproximation, max_steps=MaxSteps, tole
break
print "Current approximation %.9f" % initialApproximation
initialApproximation = p
- print_end()
if __name__ == '__main__':
newton_raphson(example_f, example_deriv, 0)
@@ -16,7 +16,6 @@ def regula_falsi(func, a, b, max_steps=MaxSteps, tolerance=Tolerance):
print "Root is %.9f (%d iterations)" % (p,int(loopCount))
return
print "Root find cancelled at %.9f" % p
- print_end()
if __name__ == '__main__':
regula_falsi(example_f, 0, 1)
@@ -18,7 +18,6 @@ def secant(func, a, b, max_steps=MaxSteps, tolerance=Tolerance):
a = b
b = p
print "Root find stopped at %.9f" % p
- print_end()
if __name__ == '__main__':
secant(example_f, 1, 0)

0 comments on commit 35396d5

Please sign in to comment.