Any real number x can be expressed as a continued fraction:
x = a₀ + 1/(a₁ + 1/(a₂ + 1/(a₃ + ...)))
Abbreviated as: x = [a₀; a₁, a₂, a₃, ...]
- a₀ = ⌊x⌋ (integer part of x)
- If x is not an integer, let x₁ = 1/(x - a₀) and continue with a₁ = ⌊x₁⌋
- Repeat this process to get a₂, a₃, ...
- The continued fraction expansion of rational numbers is finite
- The continued fraction expansion of irrational numbers is infinite