Object-oriented continued fractions with Python.
An algorithm that computes modular nested exponentiation efficiently.