Talk:Pathological floating point problems: Difference between revisions
Talk:Pathological floating point problems (view source)
Revision as of 15:49, 28 March 2018
, 6 years ago→Explanation of task 1
(→Explanation of task 1: new section) |
|||
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
w(n)=c1 5^n + c2 6^n + c3 100^n.
|