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
A function that takes a list with at least 4 numbers and if three of the numbers sum is equal to the remaining numbers return #t else return #f

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

HOW CAN I DESIGN A MOBILE WEB BROWSER LIKE OPERA MINI. USING VISUAL BASIC? HELP ME.

Write a function named prob2.m which creates and returns an N×N identity matrix. An identity matrix is a square matrix with values of one on the main diagonal and zeros in all off-

Find out the selling cost average for packages developed in Pascal

Write a program to check whether a car will crash. There is an obstacle at a certain distance (say 100 m) and the car is travelling at a certain speed (try it with some different s

An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in bu


You are required to develop a program that calculates the charges for DVD rentals, where current release cost RM3.50 and all others cost RM2.50. If a customer rents several DVDs, e

create a small database for a company, require at least 4 tables. also, have 4 business report, oracle built-in function, 5 string, 5 number or math functions, 5 date and time func