pub fn ratio_to_f64(num: &BigInt, den: &BigInt) -> f64
num / den as the nearest double. Dividing the two to_f64s overflows as soon as either half leaves the double range, so the ratio is scaled by its own bit lengths first.
num / den
to_f64