This makes fraction addition and multiplication more resistant to overflows. See the comments in the commits. This is about as far as we can go with this short of doing __int128_t internals, and that is not going to buy us much if the output has to fit within int64_t.
This makes fraction addition and multiplication more resistant to overflows. See the comments in the commits. This is about as far as we can go with this short of doing __int128_t internals, and that is not going to buy us much if the output has to fit within int64_t.