error[E0599]: no method named `ceil` found for type `f32` in the current scope
445 | (time_ps as f32 / self.t_ckavg_min_ps as f32 - 0.01).ceil() as u32
| ^^^^ method not found in `f32`
This isn't what you're asking, but you can do ceiling division with integers. If everything is positive it's just (x + y - 1) / y. I don't know how integer division performs on your hardware but the code in libm looks like it could pretty inefficient (since it has to be written portably). For floating point there are techniques for converting to integers that typically require adding and subtracting a special constant (2^52 for nonnegative f64 values) though how to get the ceiling is contingent on the rounding mode.
Yeah, it occurred to me that for this specific calculation I could do it with integers (albeit in a way that doesn't look much like the spec I'm taking the formula from), but I figured I'd ask the question anyway since I have a hard FPU and I'm going to want to use it eventually. Thanks!