A small library for fractions in python
To run, import the module in your python file with
from fractionlib.Fraction import Fraction, simplification.
Then you can create a
Fraction object with the numerator and denominator like this:
x = Fraction(2, 3).
You can perform basic arithmetic and comparisons using the Fraction objects, and you can print them.
test.py for some basic examples of fraction usage.