diff options
Diffstat (limited to 'src/libstd/num/f64.rs')
| -rw-r--r-- | src/libstd/num/f64.rs | 25 | 
1 files changed, 0 insertions, 25 deletions
| diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index c2d19d41215..86259f5af5d 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -190,22 +190,6 @@ impl Eq for f64 { } #[cfg(not(test))] -impl ApproxEq<f64> for f64 { - #[inline] - fn approx_epsilon() -> f64 { 1.0e-6 } - - #[inline] - fn approx_eq(&self, other: &f64) -> bool { - self.approx_eq_eps(other, &1.0e-6) - } - - #[inline] - fn approx_eq_eps(&self, other: &f64, approx_epsilon: &f64) -> bool { - (*self - *other).abs() < *approx_epsilon - } -} - -#[cfg(not(test))] impl Ord for f64 { #[inline] fn lt(&self, other: &f64) -> bool { (*self) < (*other) } @@ -1247,15 +1231,6 @@ mod tests { } #[test] - fn test_approx_eq() { - assert!(1.0f64.approx_eq(&1f64)); - assert!(0.9999999f64.approx_eq(&1f64)); - assert!(1.000001f64.approx_eq_eps(&1f64, &1.0e-5)); - assert!(1.0000001f64.approx_eq_eps(&1f64, &1.0e-6)); - assert!(!1.0000001f64.approx_eq_eps(&1f64, &1.0e-7)); - } - - #[test] fn test_primitive() { let none: Option<f64> = None; assert_eq!(Primitive::bits(none), mem::size_of::<f64>() * 8); | 
