Converting to Decimal
Suppose we want to output a decimal representation of . Then we start computing convergents via a table with one change: when the last two convergents have the same integer part , we output and subtract , then multiply the numerator by 10. We demonstrate this on , using the space-saving "/"-notation.
The last two convergents both floor to 3, so we output 3, subtract it from both convergents to get , and multiply by 10:
Output:
We've deleted the old values for clarity, but in future we shall preserve them. Continuing for a few more steps:
Output:
Conversion From Decimal
Converting to a nonsimple continued fraction is immediate, as seen by the example of :