Return the best rational so that a and b are multiple of it. If the resulting denominator is larger than max_den, return def.
See Implementation
Return the best rational so that a and b are multiple of it. If the resulting denominator is larger than max_den, return def.