- 15,524
- 769
That algorithm doesn't converge. I just took your code from post #17; it stopped after 50 iterations because it failed to converge.
Look at it this way: \tan x \approx x(1 - x^2/3) for small x. All setting x=\arctan(x) does when x gets even close to zero is to scale x by a factor that is nearly equal to 1.
Look at it this way: \tan x \approx x(1 - x^2/3) for small x. All setting x=\arctan(x) does when x gets even close to zero is to scale x by a factor that is nearly equal to 1.