This discussion is now closed.
Scroll to see replies
def derivative (f, x, h):
return float((f(x + h) - f(x))) / h
def solve(f, x0, h, depth):
if depth > 0:
delta = f(x0) / derivative(f, x0, h)
return solve(f, x0 - delta, h, depth - 1)
else:
return x0
double derivative( double(*f)(double), double x, double h )
{
return ( f( x + h ) - f( x ) ) / h;
}
double solve( double(*f)(double), double x0, double h, int depth )
{
if (depth > 0)
{
double delta = f(x0) / derivative( f, x0, h );
return solve( f, x0 - delta, h, depth - 1 );
}
return x0;
}
Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?Last reply 1 month ago
Free website hosting providers with no strings attached?Posted 3 months ago
iDEA silver citizen badge three. Milkshake shack coding problem.Last reply 4 months ago
How do you practice programming java for beginners?Last reply 8 months ago
hows the employment market for tech work in the UK?Writing a computer science personal statement: expert advice from universities
How to write an excellent personal statement in 10 steps
How to revise for GCSE Computer Science exams: AQA explains what to do
Artificial intelligence and robotics degree personal statement example (1a) with review and advice