Talk:Continued fraction convergents: Difference between revisions

From Rosetta Code
Content deleted Content added
mNo edit summary
Petelomax (talk | contribs)
Line 17: Line 17:
1.50000000000000 is (3,2), 1.40000000000000 is (7,5), 1.41666666666667 is (17,12) or (17/12) as the representation changes halfway through the description. [[continued fraction]] uses floating point representation and does not specifically require that ever convergent is output, this is a duplicate task in the sense that all is required is to modify the code for
1.50000000000000 is (3,2), 1.40000000000000 is (7,5), 1.41666666666667 is (17,12) or (17/12) as the representation changes halfway through the description. [[continued fraction]] uses floating point representation and does not specifically require that ever convergent is output, this is a duplicate task in the sense that all is required is to modify the code for
[[continued fraction]] to a new output format--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:19, 1 February 2024 (UTC)
[[continued fraction]] to a new output format--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:19, 1 February 2024 (UTC)

::Fair point, I'll concede they are very important to mathematicians, just not mere mortals. To the best of my recollection they were not mentioned at all during the ten or so years I attended maths lessons/lectures. It strikes me the continued fraction task can deal with several things that a,b,m,n cannot. As the task description stands, the best I could do would be to create an IEEE 754 float with all the inaccuracies that implies (even if I tell gmp to do 50,000 dp) and convert that to an approximate cf, which even to my limited understanding seems somewhat backwards. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 14:43, 1 February 2024 (UTC)

Revision as of 14:43, 1 February 2024

Clarify task

Where do a, b, m, n fit in with all this? (In particular you lost me at the word "since".) Please remember that continued fractions are an obscure mathematical curiosity from the 15th century that most normal people are not familiar with. The output for the golden ratio is not "the fibonacci series" but (I believe) it would instead be 1/1, 2/1, 3/2, 5/3, 8/5, 13/8, 21/13, etc. Petelomax (talk) 07:29, 1 February 2024 (UTC)

Well I take a bit of an exception to "an obscure mathematical curiosity from the 15th century" I'll just quote from https://www.scirp.org/journal/paperinformation?paperid=114756 "Continued fractions constitute a very important subject in mathematics. Their importance lies in the fact that they have very interesting and beautiful applications in many fields in pure and applied sciences. This review article will reveal some of these applications and will reflect the beauty behind their uses in calculating roots of real numbers, getting solutions of algebraic Equations of the second degree, and their uses in solving special ordinary differential Equations such as Legendre, Hermite, and Laguerre Equations; moreover and most important, their use in physics in solving Schrodinger Equation for a certain potential. A comparison will also be given between the results obtained via continued fractions and those obtained through the use of well-known numerical methods. Advances in the subject will be discussed at the end of this review article". My main objection is that the task references continued fraction if I look at the F# output for that task for √2 it is:
1.40000000000000 < √2 < 1.50000000000000
1.40000000000000 < √2 < 1.41666666666667
1.41379310344828 < √2 < 1.41666666666667
1.41379310344828 < √2 < 1.41428571428571
1.41420118343195 < √2 < 1.41428571428571
1.41420118343195 < √2 < 1.41421568627451
1.41421319796954 < √2 < 1.41421568627451
1.41421319796954 < √2 < 1.41421362489487
1.41421355164605 < √2 < 1.41421362489487

1.50000000000000 is (3,2), 1.40000000000000 is (7,5), 1.41666666666667 is (17,12) or (17/12) as the representation changes halfway through the description. continued fraction uses floating point representation and does not specifically require that ever convergent is output, this is a duplicate task in the sense that all is required is to modify the code for continued fraction to a new output format--Nigel Galloway (talk) 13:19, 1 February 2024 (UTC)

Fair point, I'll concede they are very important to mathematicians, just not mere mortals. To the best of my recollection they were not mentioned at all during the ten or so years I attended maths lessons/lectures. It strikes me the continued fraction task can deal with several things that a,b,m,n cannot. As the task description stands, the best I could do would be to create an IEEE 754 float with all the inaccuracies that implies (even if I tell gmp to do 50,000 dp) and convert that to an approximate cf, which even to my limited understanding seems somewhat backwards. --Petelomax (talk) 14:43, 1 February 2024 (UTC)