Convergents
Convergents[list]
gives a list of the convergents corresponding to the continued fraction terms list.
Convergents[x,n]
gives the first n convergents for a number x.
Convergents[x]
gives if possible all convergents leading to the number x.
Details
- The convergents of the continued fraction a1+1/(a2+1/(a3+…)) are the rationals a1,a1+1/a2,a1+1/(a2+1/a3),….
- For exact numbers, Convergents[x] can be used if x is rational or a quadratic irrational.
- If x is a quadratic irrational or a representation of a quadratic irrational as a continued fraction, the final list element returned by Convergents[x] is the quadratic irrational represented by x.
- For inexact numbers, Convergents[x] generates a list of all convergents that can be obtained given the precision of x.
- Convergents[x,n] will return n convergents if possible. If x represents a rational or an inexact number, fewer than n terms may be returned.
Examples
open allclose allBasic Examples (3)
Generate the first 10 convergents to the golden ratio:
Generate convergents from the continued fraction terms for GoldenRatio:
Scope (4)
Quadratic irrationals have periodic continued fractions:
Give all convergents for a rational number:
Convergents continues until the precision of the input is reached:
Properties & Relations (2)
The convergents of a number converge to it while alternating sides:
The results from Rationalize are not always among the list of convergents:
Text
Wolfram Research (2007), Convergents, Wolfram Language function, https://reference.wolfram.com/language/ref/Convergents.html.
CMS
Wolfram Language. 2007. "Convergents." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Convergents.html.
APA
Wolfram Language. (2007). Convergents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Convergents.html