### Computing the period of the continued fraction expansion of √d

The algorithm is based on K. Rosen, *Elementary number theory and its applications*, p.382, using the Pohst-Zassenhaus device of half the period k. See note,
where it is shown that Q_{h} = Q_{h+1} if k = 2h + 1, while P_{h} = P_{h+1} if k = 2h.

*Last modified 16th February 2007*

Return to main page