implement it for f32 and a few other types