Added invert function to rational.
Added function reciprocal.