about summary refs log tree commit diff
path: root/src/libstd/num/f32.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/num/f32.rs')
-rw-r--r--src/libstd/num/f32.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index 43b0235c5f4..b9814b0f5a1 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -167,22 +167,6 @@ impl Eq for f32 {
 }
 
 #[cfg(not(test))]
-impl ApproxEq<f32> for f32 {
-    #[inline]
-    fn approx_epsilon() -> f32 { 1.0e-6 }
-
-    #[inline]
-    fn approx_eq(&self, other: &f32) -> bool {
-        self.approx_eq_eps(other, &1.0e-6)
-    }
-
-    #[inline]
-    fn approx_eq_eps(&self, other: &f32, approx_epsilon: &f32) -> bool {
-        (*self - *other).abs() < *approx_epsilon
-    }
-}
-
-#[cfg(not(test))]
 impl Ord for f32 {
     #[inline]
     fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
@@ -1196,15 +1180,6 @@ mod tests {
     }
 
     #[test]
-    fn test_approx_eq() {
-        assert!(1.0f32.approx_eq(&1f32));
-        assert!(0.9999999f32.approx_eq(&1f32));
-        assert!(1.000001f32.approx_eq_eps(&1f32, &1.0e-5));
-        assert!(1.0000001f32.approx_eq_eps(&1f32, &1.0e-6));
-        assert!(!1.0000001f32.approx_eq_eps(&1f32, &1.0e-7));
-    }
-
-    #[test]
     fn test_primitive() {
         let none: Option<f32> = None;
         assert_eq!(Primitive::bits(none), mem::size_of::<f32>() * 8);