Talk:Pathological floating point problems: Difference between revisions

m
Line 31:
== Explanation of task 1 ==
 
Task 1 is a nonlinear recurrence equation. However, it's easily solved by the change of variable v(n)=w(n)/w(n-1), and it leads to the linear equation w(n)=aw(n-1)+bw(n-2)+cw(n-3), with a=111, b=-1130 and c=3000. To solve this, one has to compute the roots of the polynomial x^3-ax^2-bx-c, which are 5, 6 and 100. Hence the general solution of the linaerlinear equation is
 
w(n)=c1 5^n + c2 6^n + c3 100^n.
1,336

edits