pub(crate) fn approximate_float<T, F>( val: F, max_error: F, max_iterations: usize, ) -> Option<Ratio<T>>where T: Integer + Signed + Bounded + NumCast + Clone, F: FloatCore + NumCast,