Convergents of a Continued Fraction
|
09-20-2024, 05:27 PM
(This post was last modified: 09-20-2024 05:31 PM by Albert Chan.)
Post: #5
|
|||
|
|||
RE: Convergents of a Continued Fraction
(03-13-2022 11:41 PM)Thomas Klemm Wrote: We enter the program at label 00. I was curious if we enter some other value pairs between a0, a1 Code: a0 a1 a2 \(\displaystyle \frac{h_1}{k_1} = \frac{a_0\;a_1 + z}{a_1 + y} \;=\; a_0 + \frac{z - a_0\;y}{a_1 + y} \) \(\displaystyle \frac{h_2}{k_2} = \frac{(a_0\;a_1+z)×a_2 + a_0}{(a_1+y)×a_2+1} \;=\; a_0 + \frac{z - a_0\;y}{a_1 + y + \frac{1}{a_2}} \) ... \(\displaystyle \frac{h_∞}{k_∞} = a_0 + \frac{z - a_0\;y}{[a_1 + y ;\; a_2 , a_3 ,\; ...]}\) If {z,y} = {1,0}, this reduced to simple continued fraction \([a_0 ;\; a_1, a_2, a_3, \; ...]\) Confirm by example: 3 Enter 14 Enter 159 Enter 2654 XEQ 00 → 2.835407038748666903661571276217561 1 R/S → 2.835465529495380241648898365316275 2 R/S → 2.835446037199383959246534770761757 lua> a0, z, y, a1 = 3, 14, 159, 2654 lua> f = dfc2f(a0) lua> f(z-a0*y, a1+y) 2.835407038748667 lua> f(1) 2.83546552949538 lua> f(2) 2.835446037199384 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Convergents of a Continued Fraction - Thomas Klemm - 03-13-2022, 11:41 PM
RE: Convergents of a Continued Fraction - Albert Chan - 09-18-2024, 04:50 PM
RE: Convergents of a Continued Fraction - Albert Chan - 09-18-2024, 08:24 PM
RE: Convergents of a Continued Fraction - Albert Chan - 09-20-2024, 12:04 AM
RE: Convergents of a Continued Fraction - Albert Chan - 09-20-2024 05:27 PM
RE: Convergents of a Continued Fraction - C.Ret - 09-20-2024, 10:24 PM
RE: Convergents of a Continued Fraction - Thomas Klemm - 09-21-2024, 08:33 AM
|
User(s) browsing this thread: 3 Guest(s)