Talk:Metallic ratios: Difference between revisions

Remarks about accelerated convergece
(added some comments about scrolling (both kinds) and maximum height <PRE> windows (for output), and other stuff.)
(Remarks about accelerated convergece)
 
Line 30:
 
:and I glossed over the fact that the value I chose for c (Q) means we are subtracting -1 rather than adding +1 as it makes no difference to the answer. As for starting at 1 rather than 0... yeah, well, I mostly chose that to avoid the complication of having to trap divide by zero errors. The ratios work out due to the interval between terms; the starting value has very little effect. It may change how many terms it takes to converge (by at most 1), but the point I was trying to demonstrate with this task was the fact that the ratios ''could'' be calculated this way and the relative "''speed''" at which they converge not the actual number. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 13:06, 2 November 2019 (UTC)
 
==Accelerated Convergece==
I'm a bit rusty on some of my math skills, but when a sequence converges slowly by alternating above and below the final result, doesn't that make the sequence a candidate for some kind of tweak to make it converge more quickly? Might be interesting to make a stretch goal to illustrate how well the convergence can be shortened for each metallic ratio.
 
A Wikipedia article about [https://en.m.wikipedia.org/wiki/Golden_ratio Golden ratio] indicates there is a quadraticly converging equation for this:
<lang>
X(n)^2 + 2X(n)
X(n+1) = ----------------
X(n)^2 + 1
</lang>
 
Of course, formulas for where "B" is other than 1 would have to be worked out.
 
Another way might be to calculate a one-shot, larger-than-needed, Fibonacci number [https://rosettacode.org/wiki/Fibonacci_sequence#Arbitrary_Precision '''like this'''] to a point past where the division will yield the required amount of decimal places. The trick would be to formulate a good estimate of which nth Fibonacci number it would need. ...And what modifications are needed to do the other metallic ratios.
 
But, I suppose that, the trickiest bit would be to show how the faster convergence is still related to the "Lucas-like" sequence prescribed by the task description. --[[User:Enter your username|Enter your username]] ([[User talk:Enter your username|talk]]) 18:41, 16 September 2020 (UTC)