Finding a good substitution for solving non-linear recurrence is hard – if I were only given the problem, I wouldn’t be able to even guess to substitute sine squared.

]]>Also, might the relative ‘goodness’ of these depend on how sine and arcsine are implemented in a particular programming language? Neither one is ‘exact’…

]]>These are two separate issues.

For chaotic systems the divergence does not rely on how fast you lose precision (in other words, the amount of noise) any two different initial conditions diverge even with infinite precision (without any noise).

All I’m saying is that the divergence may not be due to the fact that you lose too much precision…

]]>Do you think the divergnce around n=50 is due to the properties of the floating point precision (The time when first differences appear) or due to the Lyapunov exponent of the system?

]]>YMMV, but I prefer to fix the axis to the same limits when showing two graphs for comparison. Your last two graphs differ in scale in their x axis. Obviously, I can do that given that you provide the code. But I think it will help the readers to better understand the issue if you update the graphs.

Again, it is just my opinion. You blog is still awesome ðŸ˜‰

]]>Now, I wonder which version is closer to the “real” value. It probably is the closed form, but when you get to large n, then 2^n squeezes out a lot of precision. On the other hand, the other version accumulates a lot of error from the iteration. Interesting …

]]>Part of what’s going on here is that the two functions have different kinds of numerical error. The function f loses precision from simple arithmetic. The sine formula loses precision due to shifting. When you multiply the argument of sine by 2^n, you’re making noisy bits significant.

]]>