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

I have a half done program that needs to be finished for a class by tomorrow night. The program will create a database and print out a menu ofoptions (already done). Ive already

how to rewrite C++ program the DNAStrand class (DNA Project) to instead store the nucleotide sequence in a dynamically-allocated array?

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

Windows Card Space Windows Card Space (codenamed Info Card), is Windows now-canceled customer application for the Identification Met system. Card Place is an instance of a class of

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

Hi I have an assignment for prolog languagle is it possible to get help

We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de

The aims of this assignment are to:    Provide experience in the use of a modern Integrated Development Environment (specifically NetBeans running on a Linux platform) for t

Of the 6,325 kindergarten students who participated in the study, almost half or 3,052 were eligible for a free lunch program. The categorical variable sesk (1 == free lunch, 2 = n