A rational number library