Implementation of a fraction data type