arithma wrote@rahmu: Can you please explain the scheme code. I couldn't get how the fixed point finder works. Some pseudo code could really help :)
I edited the code to make it more readable.
In short, the function will call itself as many times until f(x) ~ x.
Basically, consider delta the value:
delta= abs( f(x) - x )
the function keep trying to improve its result until delta is smaller than the defined tolerance.
How do I improve?
It happens that in this case (as in many other), you can find the fixed point of f by repeatedly calling the function on its own result:
let y = f(y)
y = f( f( f( f( f( f( f(... f(initial-guess)))))))))
You call f enough times for delta to be smaller than tolerance.
Initial-guess is arbitrary. The easiest case would take 1 (or 1.0 in Scheme). but in this case you can't because:
log(1000)/log(1) would be dividing by zero. So I took initial-guess=2.0.
Hope I was clear enough.