pub fn rhpf(x: f32, coarse: bool) -> f32