Talk:Metallic ratios: Difference between revisions

Remarks about accelerated convergece
m (→‎Initial values for the "Lucas sequences": signed comment and added reference to Sidef)
(Remarks about accelerated convergece)
 
(2 intermediate revisions by 2 users not shown)
Line 13:
 
::The actual value though? That's easily available in other places. I used the adjective insane because posting it here just forces '''everybody''' to scroll through huge walls of low information text. I debated even just asking for the iteration count for the stretch goal. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 12:37, 2 November 2019 (UTC)
 
::: As for huge walls of text, I tried to solve that obstacle by using a smaller font, so on ''my'' screen, it was only '''<sup>1</sup>/<sub>3</sub>''' of a screen, &nbsp; ··· &nbsp; now, admittedly, &nbsp; I have a large screen. &nbsp; (I could've even made the output smaller yet height-wise, and probably should have in retrospect, or better yet, used a ''wider'' output.) &nbsp; If anyone wanted to scroll horizontally, the capability <strike>is</strike> was there, &nbsp; but nobody is forced to scroll horizontally, &nbsp; unless they wanted to verify that their value or REXX's value is/was correct, &nbsp; or perhaps to verify some portion of that number. &nbsp; (One option I had considered was just to show the "last" hundred decimal digits of the calculated value.) &nbsp; Another option would just to use a maximum height '''output''' window (specified within the &nbsp; &nbsp; <big> <nowiki><pre></nowiki> </big> &nbsp; &nbsp; HTML tag), &nbsp; which, in hindsight, probably should've been used by most examples &nbsp; --- &nbsp; if vertical scrolling is a problem. &nbsp; I also left the (display/showing) technique intact for showing 256 decimal digits (or more) on one line, &nbsp; so there is no vertical scrolling penalty for anyone). &nbsp; Additionally, I used a smaller font for the first output to reduce scrolling for everybody. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:50, 2 November 2019 (UTC)
 
== Initial values for the "Lucas sequences" ==
Line 21 ⟶ 24:
 
On the other hand, there is no mentioning of "Lucas" or "bronze" in [https://oeis.org/A003688 A003688]. See also the Sidef entry, which uses the actual Lucas sequences. -- [[User:Trizen|Trizen]] ([[User talk:Trizen|talk]]) 13:02, 2 November 2019 (UTC)
 
:You aren't wrong, and perhaps I should specify more clearly that these are a ''variant'' of Lucas sequences in the task description (Lucas-like sequences?). Actual Lucas sequences are of the form
 
xₙ = P * xₙ₋₁ - Q * xₙ₋₂.
 
: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)