This Rational class and accompanying code were written by Antonio Diaz Diaz.
