Skip to main content

fraction

Function fraction 

Source
pub fn fraction(x: f64) -> Option<(u64, u64)>
Expand description

The simplest fraction within 1e-13 of x with a denominator of at most a million. It helps recognize an answer; it doesn’t prove the answer is exactly that fraction (docs/semantics.md, section 10).