Express ratio in simplest form (#809)