pub fn gate(v: f32) -> f32