Brent''s method, Programming Languages

This is what I have so far

def root_brent(f, a, b, errorlimit = tinyerror, n = -1, r_i = 0):
# f(a) and f(b) must have opposite signs
poly = remove_multiple_roots(poly)
counter = 0
if f(a) * f(b) >= 0:
return

if abs(f(a)) < abs(f(b)):
a, b = b, a
c = a
mflag = True

while (not f(b) == 0) and (not f(c)==0) and (abs(b-a)> errorlimit):
if f(a) .... :
s = (a*f(b)*f(c))/((f(a)-f(b))*(f(a)-f(c))) + (b*f(a)*f(c))/((f(b)-f(a))*(f(b)-f(c))) + (c*f(a)*f(b))/((f(c)-f(a))*(f(c)-f(b)))
else:
s = b- f(b)*(b-a)/(f(b)-f(a))

#### Start here
# if (condition 1) s is not between (3a + b)/4 and b
# or (condition 2) (mflag is set and |s-b| = |b-c| / 2)
# or (condition 3) (mflag is cleared and |s-b| = |c-d| / 2)
# or (condition 4) (mflag is set and |b-c| < |\delta|)
# or (condition 5) (mflag is cleared and |c-d| < |\delta|)

# or here is elif

Can ant help me getting past this point.
I am lost on what to do next.
Posted Date: 4/28/2012 11:24:52 AM | Location : United States







Related Discussions:- Brent''s method, Assignment Help, Ask Question on Brent''s method, Get Answer, Expert's Help, Brent''s method Discussions

Write discussion on Brent''s method
Your posts are moderated
Related Questions
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I WANT TO MAKE PROJECT IN ARM LANGUAGE CAN YOU HELP ME

Create a visualization (programming project) and demonstrate it in the class. The project should be related to distributed systems. (A distributed system consists of multiple auton

Given a file named maze1.txt whose contents is 1 0 2 2 1 2 3 0 3 2 2 1 2 0 2 2 3 0 1 1 3 1 0 0 2 0 3 0 0 1 2 0 3 2 2 0 1 2 3 2 1 0 0 1 1 0 0 0 your program when run as a.out

about how to create the program in c

i(t)=(V/R) * (1-e^-(R/L)(t)) (a) Defi ne an anonymous function answerE that returns i(t) given input t. (b) The fi nal value for the current is 2 amps. Find a time tm when the curr

The languages used in the module are of a type known as high-level languages. There is another set of languages known as low-level languages. (a) Differentiate between high-leve

how can we get the data from data base to combo box in jsp page dynamically

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of stri

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4