I need to calculate values of a highly nonlinear recursive function, and I am confused by the results Mathematica is returning.
z[n_, c_] := If[n > -1, z[n - 1, c]^2 + c, 0]; n = 11; x = -Sqrt; a1 = z[n, x]
a1//N (* -0.046964 *)
This returned a value, but I am concerned about rounding errors in the innermost radical propagating through iterations and increasing. So I tried using Expand in square away some of the radicals, which worked:
Despite the large integers this form seems more usable because there's only one Sqrt in it so a numerical value can be calculated with arbitrary and knowable precision. But,
returns a "No significant digits are available to display" error.
So, what should I do here? Can a2//N be forced to calculate with sufficient precision? I don't know how a1 can be used without causing a snowballing error problem.
What I ultimately need is to plot n vs z[n,x] where n>200, so please check if proposed solutions work for large n. I use n=11 above because that's the lowest n at which I encounter this problem.
A related Question was asked 5 years ago, but the answered discuss Mathematica 8, I didn't entirely understand the accepted answer, and it doesn't directly address my issue of which method to use.
PS: If anyone knows how to fix my wonkily displayed outputs above, please do.