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
1. Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print a comma separated list of inte

For this programming assignment, you are to develop a Fortran 90/95/2003 program to automate a useful task. The aim of the assignment is for you to reveal your competence in the Fo

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Assignment is to create hijara game on any plate form, you can use any plate form you like or easy to you. For instance let's say you can use visual studio, game studio (Prefer to

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

Explain, in your own words, how web designers can deal with CSS conflict resolution. What is the order of precedence between the different types of CSS (inline, embedded and extern

Explain the Continue statement - Computer Programming? This is alike to break but is encountered less frequently. It merely works within loops where its effect is to force an imm

I have doubt in this section .do-while loop.could you able to clear it for me.

We will be assuming here that our roots are of the form, in this case, r 1,2 = l + mi If we take the first root we'll find the following solution. x l + m i It i

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