A fraction module in C++