### Finding a cycle of forms determined by an indefinite binary quadratic form

Given an indefinite binary quadratic form ax^{2}+bxy+cy^{2}, we use the PQa continued fraction algorithm to determine a reduced form (i.e., 0 < √d - b < 2|a| < √d + b) and thence a cycle of reduced forms.

We also construct a unimodular transformation taking the given form into the reduced form.

Note: d=b^{2}-4ac > 0, d is not a perfect square and we assume d < 10^{6}.
See explanatory note and Henri Cohen's *A course in computational number theory*, Edition 1, pp. 257-261.

If |c| < √d, the algorithm is identical with Algorithm 5.6.5 of Henri Cohen's book.

*Last modified 11th December 2006*

Return to main page