Upgrading from:


Convergents and QuadraticIrrationalQ have been added to the built-in Mathematica kernel.


Generate the first 10 convergents to the golden ratio:

Version 5.2 << NumberTheory`ContinuedFractions`;
Convergents[GoldenRatio, 10]


Check if an expression is a quadratic irrational:

Version 5.2 << NumberTheory`ContinuedFractions`
QuadraticIrrationalQ[{3/2, Sqrt[2], Sqrt[3], Sqrt[4], Pi}]

ContinuedFractionForm and PeriodicForm were available in previous versions of Mathematica and are now available on the web at library.wolfram.com/infocenter/MathSource/6773.