SequenceLimit[{-0.5`, -0.5833333333333334`, -0.6345238095238095`, \
-0.6628718503718504`, -0.6777662022075269`, -0.685395708269249`, \
-0.6892561888834033`, -0.691197870228108`, -0.6921715717324427`, \
-0.6926591377284108`}]
The amount of math and other things stuffed into mathematica is unbelievable.
]]>M, already has a command for it!
]]>You did not try to speed it up because of the principle mentioned in "Brute Force and Mathematics". While you'd spend 10 minutes speeding it up, you'd only get a 0.01 second speed up, at best.
]]>Over at CMI?
Hohoohohoohohooh! That is a good one.
I only made it functional because of religious reasons.
That is not even a good enough reason.
]]>I only made it functional because of religious reasons.
]]>A side question: Why did I never seek to make shanks functional, thereby increasing its speed?
]]>I will never know until I try.
]]>Can you now do a much harder one?
A side question: Why did I never seek to make shanks functional, thereby increasing its speed?
]]>So, what now?
]]>shanks xs | length xs < 3 = []
shanks (x:y:z:xs) = new : shanks (y:z:xs)
where new = (x * z - y^2)/(z - 2*y + x)
is more functional than
shanks[l_] := Module[{x, n, w}, w = l; x = 1;
For[n = 3, n <= Dimensions[l][[1]], ++n,
w[[x]] = (w[[n - 2]]*w[[n]] - w[[n - 1]]^2)/
(w[[n]] - 2*w[[n - 1]] + w[[n - 2]]);
x = x + 1; ];
w = Take[w, Dimensions[w][[1]] - 2]
];
by the way, you were using x. I failed to notice it. Your implementation is not purely functional though.
]]>