Fast fractions reimplementation in Cython