ubsuny / 23-Homework6G5

MIT License
0 stars 8 forks source link

root_simple unable to find root for tanh(x) #22

Open WildJimmy opened 10 months ago

WildJimmy commented 10 months ago

I can't get root_simple to find the roots of tanh(x) when given a positive initial guess. It will always exceed the maximum number of steps. However, for negative guesses it is fine. Any ideas on how to resolve this without changing the algorithm? I'm a little confused because tan and tanh have roughly the same behavior around x = 0 and I do not have this issue with finding the roots of tan

poojashresthacode commented 10 months ago

Sorry @WildJimmy , I have no idea about that.