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