View Single Post
Old 2020-08-01, 10:03   #13
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

101101110102 Posts
Default

Quote:
Originally Posted by LaurV View Post
Edit: yep, the manual says it uses Brent (draw a secant from a to b, it intersects Ox, that is the new point, it matched with your output, well,
Ok, but for f(x)=x^3 it is weaker than the binary search. Just try this:
Code:
cnt=0;solve(x=-1,2,cnt+=1;print(cnt" "x);x^3)
So it is doing at most 259 iterations.
R. Gerbicz is offline   Reply With Quote