pub fn settling_time( values: &[f64], target: f64, tolerance: f64, dt: f64, ) -> Result<Option<f64>, StabilityError>