Closed WildJimmy closed 8 months ago
@WildJimmy We don't have to find the exact root. The precise value for tanh(x) is okay. All we need to find out is how many digits the values are accurate. I chose 1 and -1 both of them gave the same magnitude but opposite signs. Comparing them and choosing the best value close to zero. I guess that way we can work out. Have you tried the root_secant function?
@s4il3sh can you share the plots?
Good luck, let me know if you need help
@s4il3sh The deadline is today at 2 pm. Please let us know if you need help.
I just merged his work.
I'm having some issues with task 2. 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