Further Examples: ContinuedFraction
The result of ContinuedFraction is given as a list.
The continued fraction simplifies to the original fraction.
This gives the continued fraction representation of a quadratic number. The sublist represents the repeated part.
You can go back to the number with FromContinuedFraction.
This gives the first few terms of the continued fraction representation of a transcendental number.
Here is a special case of Pell's equation. In a Diophantine equation like this the parameter m and the variables x and y are assumed to be integers.
PellSolve gives the least positive solution for x and y when m is not a perfect square.
Here is the solution when m is .
See also FromContinuedFraction.