Finding the reduced form equivalent to a positive definite binary quadratic form

Given a positive definite binary qudratic form ax2+bxy+cy2, we use an algorithm of Gauss to determine an equivalent reduced form (A,B,C) and the corresponding unimodular transformation matrix.
Note: d=b2-4ac < 0, a > 0, c > 0.
(A,B,C) satisfies -A < B ≤ A, C ≥ A, with B ≥ 0 if C = A.
The number of steps taken in the reduction is returned.

(See L.E. Dickson, Introduction to the theory of numbers, page 69.)

Enter a:
Enter b:
Enter c:

Last modified 20th January 2005
Return to main page