Skip to main content

ratio_to_f64

Function ratio_to_f64 

Source
pub fn ratio_to_f64(num: &BigInt, den: &BigInt) -> f64
Expand description

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.