1use crate::numeric::Numeric; 2 3pub trait Float: Numeric { 4 fn f_sqrt(self) -> Self; 5} 6 7impl Float for f32 { 8 fn f_sqrt(self) -> f32 { 9 self.sqrt() 10 } 11} 12 13impl Float for f64 { 14 fn f_sqrt(self) -> f64 { 15 self.sqrt() 16 } 17}