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:

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)))
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

Design an object definition named Pet, which should have the following fields: name: The name field holds the name of a Pet type: The type field holds the type of anima

Write and test a simple perl program on the linux platform.  You may use any linux system you wish, including the Suse linux installed in the lab. Activities. Note:  to r

1- If the order of a (mod P) is 3, prove that the order of a+1 is 6. 2- Explain why the "simplifiled knapsack" code is not secure.

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

Expertsmind brings you unique solution in java assignments Packages A Java packages is a process for planning Java sessions into namespaces just like the segments of Modu

Flatten the tree Consider the following XML input, which groups people into two categories-salaried and hourly: Warren Rosenbaum 37 5.75

You must implement the control mechanism for the robot arm so that it can safely move the blocks from the source pile to their destination, without colliding with any obstacles or

A number of simple student records are written to a text file. The format of some typical linesshould be - Task (1): Using a text editor, create a file with 10 such reco