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

Given a positive definite binary quadratic 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 B2 - 4AC = d, -A < B ≤ A < C or 0 ≤ B ≤ A = C.
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 7th June 2011
Return to main page