Testing a quadratic irrational for being NSCF reduced

This program takes a quadratic surd ξ=(p + √d)/q, p > 0, q > 0, converts it to standard form if necessary and decides whether or not ξ is NSCF reduced. In the case that it is NSCF reduced, its NSCF reduced predecessor is determined. See the algorithm.
Enter d (1 < d < 1015 and not a square):
Enter p: (> 0)
Enter q: (> 0)

Last modified 15th December 2009
Return to main page