about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-17 15:32:42 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-21 11:37:43 -0700
commiteeb94886adccb3f13003f92f117115d17846ce1f (patch)
tree2d729b8e48c5022941e2c06e412a2b2a1744ca1c /src/libstd/num
parente091ba3f3e8b2b00827ab4934314829b33ffb966 (diff)
downloadrust-eeb94886adccb3f13003f92f117115d17846ce1f.tar.gz
rust-eeb94886adccb3f13003f92f117115d17846ce1f.zip
std: Remove deprecated/unstable num functionality
This commit removes all the old casting/generic traits from `std::num` that are
no longer in use by the standard library. This additionally removes the old
`strconv` module which has not seen much use in quite a long time. All generic
functionality has been supplanted with traits in the `num` crate and the
`strconv` module is supplanted with the [rust-strconv crate][rust-strconv].

[rust-strconv]: https://github.com/lifthrasiir/rust-strconv

This is a breaking change due to the removal of these deprecated crates, and the
alternative crates are listed above.

[breaking-change]
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/f32.rs434
-rw-r--r--src/libstd/num/f64.rs407
-rw-r--r--src/libstd/num/mod.rs1093
-rw-r--r--src/libstd/num/strconv.rs556
4 files changed, 10 insertions, 2480 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index 736f6d2f4f4..430fec4ff2e 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -15,20 +15,14 @@
 #![allow(unsigned_negation)]
 #![doc(primitive = "f32")]
 
-use prelude::v1::*;
-
 use intrinsics;
 use libc::c_int;
-use num::{Float, FpCategory};
-use num::strconv;
-use num::strconv::ExponentFormat::{ExpNone, ExpDec};
-use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
-use num::strconv::SignFormat::SignNeg;
+use num::FpCategory;
 
 use core::num;
 
-pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
-pub use core::f32::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
+pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON};
+pub use core::f32::{MIN_EXP, MAX_EXP, MIN_10_EXP};
 pub use core::f32::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY};
 pub use core::f32::{MIN, MIN_POSITIVE, MAX};
 pub use core::f32::consts;
@@ -74,290 +68,6 @@ mod cmath {
     }
 }
 
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(deprecated)]
-impl Float for f32 {
-    #[inline]
-    fn nan() -> f32 { num::Float::nan() }
-    #[inline]
-    fn infinity() -> f32 { num::Float::infinity() }
-    #[inline]
-    fn neg_infinity() -> f32 { num::Float::neg_infinity() }
-    #[inline]
-    fn zero() -> f32 { num::Float::zero() }
-    #[inline]
-    fn neg_zero() -> f32 { num::Float::neg_zero() }
-    #[inline]
-    fn one() -> f32 { num::Float::one() }
-
-    #[allow(deprecated)]
-    #[inline]
-    fn mantissa_digits(unused_self: Option<f32>) -> usize {
-        num::Float::mantissa_digits(unused_self)
-    }
-    #[allow(deprecated)]
-    #[inline]
-    fn digits(unused_self: Option<f32>) -> usize { num::Float::digits(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn epsilon() -> f32 { num::Float::epsilon() }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_exp(unused_self: Option<f32>) -> isize { num::Float::min_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_exp(unused_self: Option<f32>) -> isize { num::Float::max_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_10_exp(unused_self: Option<f32>) -> isize { num::Float::min_10_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_10_exp(unused_self: Option<f32>) -> isize { num::Float::max_10_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_value() -> f32 { num::Float::min_value() }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_pos_value(unused_self: Option<f32>) -> f32 { num::Float::min_pos_value(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_value() -> f32 { num::Float::max_value() }
-
-    #[inline]
-    fn is_nan(self) -> bool { num::Float::is_nan(self) }
-    #[inline]
-    fn is_infinite(self) -> bool { num::Float::is_infinite(self) }
-    #[inline]
-    fn is_finite(self) -> bool { num::Float::is_finite(self) }
-    #[inline]
-    fn is_normal(self) -> bool { num::Float::is_normal(self) }
-    #[inline]
-    fn classify(self) -> FpCategory { num::Float::classify(self) }
-
-    #[inline]
-    fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) }
-
-    #[inline]
-    fn floor(self) -> f32 { num::Float::floor(self) }
-    #[inline]
-    fn ceil(self) -> f32 { num::Float::ceil(self) }
-    #[inline]
-    fn round(self) -> f32 { num::Float::round(self) }
-    #[inline]
-    fn trunc(self) -> f32 { num::Float::trunc(self) }
-    #[inline]
-    fn fract(self) -> f32 { num::Float::fract(self) }
-
-    #[inline]
-    fn abs(self) -> f32 { num::Float::abs(self) }
-    #[inline]
-    fn signum(self) -> f32 { num::Float::signum(self) }
-    #[inline]
-    fn is_positive(self) -> bool { num::Float::is_positive(self) }
-    #[inline]
-    fn is_negative(self) -> bool { num::Float::is_negative(self) }
-
-    #[inline]
-    fn mul_add(self, a: f32, b: f32) -> f32 { num::Float::mul_add(self, a, b) }
-    #[inline]
-    fn recip(self) -> f32 { num::Float::recip(self) }
-
-    #[inline]
-    fn powi(self, n: i32) -> f32 { num::Float::powi(self, n) }
-    #[inline]
-    fn powf(self, n: f32) -> f32 { num::Float::powf(self, n) }
-
-    #[inline]
-    fn sqrt(self) -> f32 { num::Float::sqrt(self) }
-    #[inline]
-    fn rsqrt(self) -> f32 { num::Float::rsqrt(self) }
-
-    #[inline]
-    fn exp(self) -> f32 { num::Float::exp(self) }
-    #[inline]
-    fn exp2(self) -> f32 { num::Float::exp2(self) }
-    #[inline]
-    fn ln(self) -> f32 { num::Float::ln(self) }
-    #[inline]
-    fn log(self, base: f32) -> f32 { num::Float::log(self, base) }
-    #[inline]
-    fn log2(self) -> f32 { num::Float::log2(self) }
-    #[inline]
-    fn log10(self) -> f32 { num::Float::log10(self) }
-    #[inline]
-    fn to_degrees(self) -> f32 { num::Float::to_degrees(self) }
-    #[inline]
-    fn to_radians(self) -> f32 { num::Float::to_radians(self) }
-
-    /// Constructs a floating point number by multiplying `x` by 2 raised to the
-    /// power of `exp`
-    #[inline]
-    fn ldexp(self, exp: isize) -> f32 {
-        unsafe { cmath::ldexpf(self, exp as c_int) }
-    }
-
-    /// Breaks the number into a normalized fraction and a base-2 exponent,
-    /// satisfying:
-    ///
-    /// - `self = x * pow(2, exp)`
-    /// - `0.5 <= abs(x) < 1.0`
-    #[inline]
-    fn frexp(self) -> (f32, isize) {
-        unsafe {
-            let mut exp = 0;
-            let x = cmath::frexpf(self, &mut exp);
-            (x, exp as isize)
-        }
-    }
-
-    /// Returns the next representable floating-point value in the direction of
-    /// `other`.
-    #[inline]
-    fn next_after(self, other: f32) -> f32 {
-        unsafe { cmath::nextafterf(self, other) }
-    }
-
-    #[inline]
-    fn max(self, other: f32) -> f32 {
-        unsafe { cmath::fmaxf(self, other) }
-    }
-
-    #[inline]
-    fn min(self, other: f32) -> f32 {
-        unsafe { cmath::fminf(self, other) }
-    }
-
-    #[inline]
-    fn abs_sub(self, other: f32) -> f32 {
-        unsafe { cmath::fdimf(self, other) }
-    }
-
-    #[inline]
-    fn cbrt(self) -> f32 {
-        unsafe { cmath::cbrtf(self) }
-    }
-
-    #[inline]
-    fn hypot(self, other: f32) -> f32 {
-        unsafe { cmath::hypotf(self, other) }
-    }
-
-    #[inline]
-    fn sin(self) -> f32 {
-        unsafe { intrinsics::sinf32(self) }
-    }
-
-    #[inline]
-    fn cos(self) -> f32 {
-        unsafe { intrinsics::cosf32(self) }
-    }
-
-    #[inline]
-    fn tan(self) -> f32 {
-        unsafe { cmath::tanf(self) }
-    }
-
-    #[inline]
-    fn asin(self) -> f32 {
-        unsafe { cmath::asinf(self) }
-    }
-
-    #[inline]
-    fn acos(self) -> f32 {
-        unsafe { cmath::acosf(self) }
-    }
-
-    #[inline]
-    fn atan(self) -> f32 {
-        unsafe { cmath::atanf(self) }
-    }
-
-    #[inline]
-    fn atan2(self, other: f32) -> f32 {
-        unsafe { cmath::atan2f(self, other) }
-    }
-
-    /// Simultaneously computes the sine and cosine of the number
-    #[inline]
-    fn sin_cos(self) -> (f32, f32) {
-        (self.sin(), self.cos())
-    }
-
-    /// Returns the exponential of the number, minus `1`, in a way that is
-    /// accurate even if the number is close to zero
-    #[inline]
-    fn exp_m1(self) -> f32 {
-        unsafe { cmath::expm1f(self) }
-    }
-
-    /// Returns the natural logarithm of the number plus `1` (`ln(1+n)`) more
-    /// accurately than if the operations were performed separately
-    #[inline]
-    fn ln_1p(self) -> f32 {
-        unsafe { cmath::log1pf(self) }
-    }
-
-    #[inline]
-    fn sinh(self) -> f32 {
-        unsafe { cmath::sinhf(self) }
-    }
-
-    #[inline]
-    fn cosh(self) -> f32 {
-        unsafe { cmath::coshf(self) }
-    }
-
-    #[inline]
-    fn tanh(self) -> f32 {
-        unsafe { cmath::tanhf(self) }
-    }
-
-    /// Inverse hyperbolic sine
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic sine of `self` will be returned
-    /// - `self` if `self` is `0.0`, `-0.0`, `INFINITY`, or `NEG_INFINITY`
-    /// - `NAN` if `self` is `NAN`
-    #[inline]
-    fn asinh(self) -> f32 {
-        match self {
-            NEG_INFINITY => NEG_INFINITY,
-            x => (x + ((x * x) + 1.0).sqrt()).ln(),
-        }
-    }
-
-    /// Inverse hyperbolic cosine
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic cosine of `self` will be returned
-    /// - `INFINITY` if `self` is `INFINITY`
-    /// - `NAN` if `self` is `NAN` or `self < 1.0` (including `NEG_INFINITY`)
-    #[inline]
-    fn acosh(self) -> f32 {
-        match self {
-            x if x < 1.0 => Float::nan(),
-            x => (x + ((x * x) - 1.0).sqrt()).ln(),
-        }
-    }
-
-    /// Inverse hyperbolic tangent
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic tangent of `self` will be returned
-    /// - `self` if `self` is `0.0` or `-0.0`
-    /// - `INFINITY` if `self` is `1.0`
-    /// - `NEG_INFINITY` if `self` is `-1.0`
-    /// - `NAN` if the `self` is `NAN` or outside the domain of `-1.0 <= self <= 1.0`
-    ///   (including `INFINITY` and `NEG_INFINITY`)
-    #[inline]
-    fn atanh(self) -> f32 {
-        0.5 * ((2.0 * self) / (1.0 - self)).ln_1p()
-    }
-}
-
 #[cfg(not(test))]
 #[lang = "f32"]
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -617,11 +327,6 @@ impl f32 {
     #[inline]
     pub fn is_sign_positive(self) -> bool { num::Float::is_positive(self) }
 
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[deprecated(since = "1.0.0", reason = "renamed to is_sign_positive")]
-    #[inline]
-    pub fn is_positive(self) -> bool { num::Float::is_positive(self) }
-
     /// Returns `true` if `self`'s sign is negative, including `-0.0`
     /// and `NEG_INFINITY`.
     ///
@@ -641,11 +346,6 @@ impl f32 {
     #[inline]
     pub fn is_sign_negative(self) -> bool { num::Float::is_negative(self) }
 
-    #[stable(feature = "rust1", since = "1.0.0")]
-    #[deprecated(since = "1.0.0", reason = "renamed to is_sign_negative")]
-    #[inline]
-    pub fn is_negative(self) -> bool { num::Float::is_negative(self) }
-
     /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
     /// error. This produces a more accurate result with better performance than
     /// a separate multiplication operation followed by an add.
@@ -729,24 +429,6 @@ impl f32 {
     #[inline]
     pub fn sqrt(self) -> f32 { num::Float::sqrt(self) }
 
-    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::f32;
-    ///
-    /// let f = 4.0f32;
-    ///
-    /// let abs_difference = (f.rsqrt() - 0.5).abs();
-    ///
-    /// assert!(abs_difference <= f32::EPSILON);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    #[deprecated(since = "1.0.0", reason = "use self.sqrt().recip() instead")]
-    #[inline]
-    pub fn rsqrt(self) -> f32 { num::Float::rsqrt(self) }
-
     /// Returns `e^(self)`, (the exponential function).
     ///
     /// ```
@@ -1339,7 +1021,7 @@ impl f32 {
     #[inline]
     pub fn acosh(self) -> f32 {
         match self {
-            x if x < 1.0 => Float::nan(),
+            x if x < 1.0 => num::Float::nan(),
             x => (x + ((x * x) - 1.0).sqrt()).ln(),
         }
     }
@@ -1363,114 +1045,6 @@ impl f32 {
     }
 }
 
-//
-// Section: String Conversions
-//
-
-/// Converts a float to a string
-///
-/// # Arguments
-///
-/// * num - The float value
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use the ToString trait instead")]
-pub fn to_string(num: f32) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigAll, ExpNone, false);
-    r
-}
-
-/// Converts a float to a string in hexadecimal format
-///
-/// # Arguments
-///
-/// * num - The float value
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use format! instead")]
-pub fn to_str_hex(num: f32) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 16, true, SignNeg, DigAll, ExpNone, false);
-    r
-}
-
-/// Converts a float to a string in a given radix, and a flag indicating
-/// whether it's a special value
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * radix - The base to use
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use format! instead")]
-pub fn to_str_radix_special(num: f32, rdx: u32) -> (String, bool) {
-    strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
-}
-
-/// Converts a float to a string with exactly the number of
-/// provided significant digits
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of significant digits
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exact(num: f32, dig: usize) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigExact(dig), ExpNone, false);
-    r
-}
-
-/// Converts a float to a string with a maximum number of
-/// significant digits
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of significant digits
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_digits(num: f32, dig: usize) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigMax(dig), ExpNone, false);
-    r
-}
-
-/// Converts a float to a string using the exponential notation with exactly the number of
-/// provided digits after the decimal point in the significand
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of digits after the decimal point
-/// * upper - Use `E` instead of `e` for the exponent sign
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_exact(num: f32, dig: usize, upper: bool) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigExact(dig), ExpDec, upper);
-    r
-}
-
-/// Converts a float to a string using the exponential notation with the maximum number of
-/// digits after the decimal point in the significand
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of digits after the decimal point
-/// * upper - Use `E` instead of `e` for the exponent sign
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_digits(num: f32, dig: usize, upper: bool) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigMax(dig), ExpDec, upper);
-    r
-}
-
 #[cfg(test)]
 mod tests {
     use f32::*;
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index bb9067eca13..bd50a087c71 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -14,20 +14,14 @@
 #![allow(missing_docs)]
 #![doc(primitive = "f64")]
 
-use prelude::v1::*;
-
 use intrinsics;
 use libc::c_int;
-use num::{Float, FpCategory};
-use num::strconv;
-use num::strconv::ExponentFormat::{ExpNone, ExpDec};
-use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
-use num::strconv::SignFormat::SignNeg;
+use num::FpCategory;
 
 use core::num;
 
-pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
-pub use core::f64::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
+pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON};
+pub use core::f64::{MIN_EXP, MAX_EXP, MIN_10_EXP};
 pub use core::f64::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY};
 pub use core::f64::{MIN, MIN_POSITIVE, MAX};
 pub use core::f64::consts;
@@ -82,291 +76,6 @@ mod cmath {
     }
 }
 
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(deprecated)]
-impl Float for f64 {
-    // inlined methods from `num::Float`
-    #[inline]
-    fn nan() -> f64 { num::Float::nan() }
-    #[inline]
-    fn infinity() -> f64 { num::Float::infinity() }
-    #[inline]
-    fn neg_infinity() -> f64 { num::Float::neg_infinity() }
-    #[inline]
-    fn zero() -> f64 { num::Float::zero() }
-    #[inline]
-    fn neg_zero() -> f64 { num::Float::neg_zero() }
-    #[inline]
-    fn one() -> f64 { num::Float::one() }
-
-
-    #[allow(deprecated)]
-    #[inline]
-    fn mantissa_digits(unused_self: Option<f64>) -> usize {
-        num::Float::mantissa_digits(unused_self)
-    }
-    #[allow(deprecated)]
-    #[inline]
-    fn digits(unused_self: Option<f64>) -> usize { num::Float::digits(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn epsilon() -> f64 { num::Float::epsilon() }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_exp(unused_self: Option<f64>) -> isize { num::Float::min_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_exp(unused_self: Option<f64>) -> isize { num::Float::max_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_10_exp(unused_self: Option<f64>) -> isize { num::Float::min_10_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_10_exp(unused_self: Option<f64>) -> isize { num::Float::max_10_exp(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_value() -> f64 { num::Float::min_value() }
-    #[allow(deprecated)]
-    #[inline]
-    fn min_pos_value(unused_self: Option<f64>) -> f64 { num::Float::min_pos_value(unused_self) }
-    #[allow(deprecated)]
-    #[inline]
-    fn max_value() -> f64 { num::Float::max_value() }
-
-    #[inline]
-    fn is_nan(self) -> bool { num::Float::is_nan(self) }
-    #[inline]
-    fn is_infinite(self) -> bool { num::Float::is_infinite(self) }
-    #[inline]
-    fn is_finite(self) -> bool { num::Float::is_finite(self) }
-    #[inline]
-    fn is_normal(self) -> bool { num::Float::is_normal(self) }
-    #[inline]
-    fn classify(self) -> FpCategory { num::Float::classify(self) }
-
-    #[inline]
-    fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) }
-
-    #[inline]
-    fn floor(self) -> f64 { num::Float::floor(self) }
-    #[inline]
-    fn ceil(self) -> f64 { num::Float::ceil(self) }
-    #[inline]
-    fn round(self) -> f64 { num::Float::round(self) }
-    #[inline]
-    fn trunc(self) -> f64 { num::Float::trunc(self) }
-    #[inline]
-    fn fract(self) -> f64 { num::Float::fract(self) }
-
-    #[inline]
-    fn abs(self) -> f64 { num::Float::abs(self) }
-    #[inline]
-    fn signum(self) -> f64 { num::Float::signum(self) }
-    #[inline]
-    fn is_positive(self) -> bool { num::Float::is_positive(self) }
-    #[inline]
-    fn is_negative(self) -> bool { num::Float::is_negative(self) }
-
-    #[inline]
-    fn mul_add(self, a: f64, b: f64) -> f64 { num::Float::mul_add(self, a, b) }
-    #[inline]
-    fn recip(self) -> f64 { num::Float::recip(self) }
-
-    #[inline]
-    fn powi(self, n: i32) -> f64 { num::Float::powi(self, n) }
-    #[inline]
-    fn powf(self, n: f64) -> f64 { num::Float::powf(self, n) }
-
-    #[inline]
-    fn sqrt(self) -> f64 { num::Float::sqrt(self) }
-    #[inline]
-    fn rsqrt(self) -> f64 { num::Float::rsqrt(self) }
-
-    #[inline]
-    fn exp(self) -> f64 { num::Float::exp(self) }
-    #[inline]
-    fn exp2(self) -> f64 { num::Float::exp2(self) }
-    #[inline]
-    fn ln(self) -> f64 { num::Float::ln(self) }
-    #[inline]
-    fn log(self, base: f64) -> f64 { num::Float::log(self, base) }
-    #[inline]
-    fn log2(self) -> f64 { num::Float::log2(self) }
-    #[inline]
-    fn log10(self) -> f64 { num::Float::log10(self) }
-
-    #[inline]
-    fn to_degrees(self) -> f64 { num::Float::to_degrees(self) }
-    #[inline]
-    fn to_radians(self) -> f64 { num::Float::to_radians(self) }
-
-    #[inline]
-    fn ldexp(self, exp: isize) -> f64 {
-        unsafe { cmath::ldexp(self, exp as c_int) }
-    }
-
-    /// Breaks the number into a normalized fraction and a base-2 exponent,
-    /// satisfying:
-    ///
-    /// - `self = x * pow(2, exp)`
-    /// - `0.5 <= abs(x) < 1.0`
-    #[inline]
-    fn frexp(self) -> (f64, isize) {
-        unsafe {
-            let mut exp = 0;
-            let x = cmath::frexp(self, &mut exp);
-            (x, exp as isize)
-        }
-    }
-
-    /// Returns the next representable floating-point value in the direction of
-    /// `other`.
-    #[inline]
-    fn next_after(self, other: f64) -> f64 {
-        unsafe { cmath::nextafter(self, other) }
-    }
-
-    #[inline]
-    fn max(self, other: f64) -> f64 {
-        unsafe { cmath::fmax(self, other) }
-    }
-
-    #[inline]
-    fn min(self, other: f64) -> f64 {
-        unsafe { cmath::fmin(self, other) }
-    }
-
-    #[inline]
-    fn abs_sub(self, other: f64) -> f64 {
-        unsafe { cmath::fdim(self, other) }
-    }
-
-    #[inline]
-    fn cbrt(self) -> f64 {
-        unsafe { cmath::cbrt(self) }
-    }
-
-    #[inline]
-    fn hypot(self, other: f64) -> f64 {
-        unsafe { cmath::hypot(self, other) }
-    }
-
-    #[inline]
-    fn sin(self) -> f64 {
-        unsafe { intrinsics::sinf64(self) }
-    }
-
-    #[inline]
-    fn cos(self) -> f64 {
-        unsafe { intrinsics::cosf64(self) }
-    }
-
-    #[inline]
-    fn tan(self) -> f64 {
-        unsafe { cmath::tan(self) }
-    }
-
-    #[inline]
-    fn asin(self) -> f64 {
-        unsafe { cmath::asin(self) }
-    }
-
-    #[inline]
-    fn acos(self) -> f64 {
-        unsafe { cmath::acos(self) }
-    }
-
-    #[inline]
-    fn atan(self) -> f64 {
-        unsafe { cmath::atan(self) }
-    }
-
-    #[inline]
-    fn atan2(self, other: f64) -> f64 {
-        unsafe { cmath::atan2(self, other) }
-    }
-
-    /// Simultaneously computes the sine and cosine of the number
-    #[inline]
-    fn sin_cos(self) -> (f64, f64) {
-        (self.sin(), self.cos())
-    }
-
-    /// Returns the exponential of the number, minus `1`, in a way that is
-    /// accurate even if the number is close to zero
-    #[inline]
-    fn exp_m1(self) -> f64 {
-        unsafe { cmath::expm1(self) }
-    }
-
-    /// Returns the natural logarithm of the number plus `1` (`ln(1+n)`) more
-    /// accurately than if the operations were performed separately
-    #[inline]
-    fn ln_1p(self) -> f64 {
-        unsafe { cmath::log1p(self) }
-    }
-
-    #[inline]
-    fn sinh(self) -> f64 {
-        unsafe { cmath::sinh(self) }
-    }
-
-    #[inline]
-    fn cosh(self) -> f64 {
-        unsafe { cmath::cosh(self) }
-    }
-
-    #[inline]
-    fn tanh(self) -> f64 {
-        unsafe { cmath::tanh(self) }
-    }
-
-    /// Inverse hyperbolic sine
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic sine of `self` will be returned
-    /// - `self` if `self` is `0.0`, `-0.0`, `INFINITY`, or `NEG_INFINITY`
-    /// - `NAN` if `self` is `NAN`
-    #[inline]
-    fn asinh(self) -> f64 {
-        match self {
-            NEG_INFINITY => NEG_INFINITY,
-            x => (x + ((x * x) + 1.0).sqrt()).ln(),
-        }
-    }
-
-    /// Inverse hyperbolic cosine
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic cosine of `self` will be returned
-    /// - `INFINITY` if `self` is `INFINITY`
-    /// - `NAN` if `self` is `NAN` or `self < 1.0` (including `NEG_INFINITY`)
-    #[inline]
-    fn acosh(self) -> f64 {
-        match self {
-            x if x < 1.0 => Float::nan(),
-            x => (x + ((x * x) - 1.0).sqrt()).ln(),
-        }
-    }
-
-    /// Inverse hyperbolic tangent
-    ///
-    /// # Returns
-    ///
-    /// - on success, the inverse hyperbolic tangent of `self` will be returned
-    /// - `self` if `self` is `0.0` or `-0.0`
-    /// - `INFINITY` if `self` is `1.0`
-    /// - `NEG_INFINITY` if `self` is `-1.0`
-    /// - `NAN` if the `self` is `NAN` or outside the domain of `-1.0 <= self <= 1.0`
-    ///   (including `INFINITY` and `NEG_INFINITY`)
-    #[inline]
-    fn atanh(self) -> f64 {
-        0.5 * ((2.0 * self) / (1.0 - self)).ln_1p()
-    }
-}
-
 #[cfg(not(test))]
 #[lang = "f64"]
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -1304,7 +1013,7 @@ impl f64 {
     #[inline]
     pub fn acosh(self) -> f64 {
         match self {
-            x if x < 1.0 => Float::nan(),
+            x if x < 1.0 => num::Float::nan(),
             x => (x + ((x * x) - 1.0).sqrt()).ln(),
         }
     }
@@ -1328,114 +1037,6 @@ impl f64 {
     }
 }
 
-//
-// Section: String Conversions
-//
-
-/// Converts a float to a string
-///
-/// # Arguments
-///
-/// * num - The float value
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use the ToString trait instead")]
-pub fn to_string(num: f64) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigAll, ExpNone, false);
-    r
-}
-
-/// Converts a float to a string in hexadecimal format
-///
-/// # Arguments
-///
-/// * num - The float value
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use format! instead")]
-pub fn to_str_hex(num: f64) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 16, true, SignNeg, DigAll, ExpNone, false);
-    r
-}
-
-/// Converts a float to a string in a given radix, and a flag indicating
-/// whether it's a special value
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * radix - The base to use
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-#[deprecated(since = "1.0.0", reason = "use format! instead")]
-pub fn to_str_radix_special(num: f64, rdx: u32) -> (String, bool) {
-    strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
-}
-
-/// Converts a float to a string with exactly the number of
-/// provided significant digits
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of significant digits
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exact(num: f64, dig: usize) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigExact(dig), ExpNone, false);
-    r
-}
-
-/// Converts a float to a string with a maximum number of
-/// significant digits
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of significant digits
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_digits(num: f64, dig: usize) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigMax(dig), ExpNone, false);
-    r
-}
-
-/// Converts a float to a string using the exponential notation with exactly the number of
-/// provided digits after the decimal point in the significand
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of digits after the decimal point
-/// * upper - Use `E` instead of `e` for the exponent sign
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_exact(num: f64, dig: usize, upper: bool) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigExact(dig), ExpDec, upper);
-    r
-}
-
-/// Converts a float to a string using the exponential notation with the maximum number of
-/// digits after the decimal point in the significand
-///
-/// # Arguments
-///
-/// * num - The float value
-/// * digits - The number of digits after the decimal point
-/// * upper - Use `E` instead of `e` for the exponent sign
-#[inline]
-#[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_digits(num: f64, dig: usize, upper: bool) -> String {
-    let (r, _) = strconv::float_to_str_common(
-        num, 10, true, SignNeg, DigMax(dig), ExpDec, upper);
-    r
-}
-
 #[cfg(test)]
 mod tests {
     use f64::*;
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index e0b9c720dbb..dbe06b77329 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -15,1102 +15,13 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 #![allow(missing_docs)]
-#![allow(deprecated)]
 
 #[cfg(test)] use fmt::Debug;
-use ops::{Add, Sub, Mul, Div, Rem, Neg};
-
-use marker::Copy;
-use clone::Clone;
-use cmp::{PartialOrd, PartialEq};
-
-pub use core::num::{Int, SignedInt, Zero, One};
-pub use core::num::{cast, FromPrimitive, NumCast, ToPrimitive};
-pub use core::num::{from_int, from_i8, from_i16, from_i32, from_i64};
-pub use core::num::{from_uint, from_u8, from_u16, from_u32, from_u64};
-pub use core::num::{from_f32, from_f64};
-pub use core::num::{FromStrRadix, from_str_radix};
+
+pub use core::num::{Zero, One};
 pub use core::num::{FpCategory, ParseIntError, ParseFloatError};
 pub use core::num::{wrapping, Wrapping};
 
-use option::Option;
-
-#[unstable(feature = "std_misc", reason = "likely to be removed")]
-pub mod strconv;
-
-/// Mathematical operations on primitive floating point numbers.
-#[stable(feature = "rust1", since = "1.0.0")]
-#[deprecated(since = "1.0.0",
-             reason = "replaced by inherent methods; use rust-lang/num for generics")]
-pub trait Float
-    : Copy + Clone
-    + NumCast
-    + PartialOrd
-    + PartialEq
-    + Neg<Output=Self>
-    + Add<Output=Self>
-    + Sub<Output=Self>
-    + Mul<Output=Self>
-    + Div<Output=Self>
-    + Rem<Output=Self>
-{
-    // inlined methods from `num::Float`
-    /// Returns the `NaN` value.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let nan: f32 = Float::nan();
-    ///
-    /// assert!(nan.is_nan());
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn nan() -> Self;
-    /// Returns the infinite value.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f32;
-    ///
-    /// let infinity: f32 = Float::infinity();
-    ///
-    /// assert!(infinity.is_infinite());
-    /// assert!(!infinity.is_finite());
-    /// assert!(infinity > f32::MAX);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn infinity() -> Self;
-    /// Returns the negative infinite value.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f32;
-    ///
-    /// let neg_infinity: f32 = Float::neg_infinity();
-    ///
-    /// assert!(neg_infinity.is_infinite());
-    /// assert!(!neg_infinity.is_finite());
-    /// assert!(neg_infinity < f32::MIN);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn neg_infinity() -> Self;
-    /// Returns `0.0`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let inf: f32 = Float::infinity();
-    /// let zero: f32 = Float::zero();
-    /// let neg_zero: f32 = Float::neg_zero();
-    ///
-    /// assert_eq!(zero, neg_zero);
-    /// assert_eq!(7.0f32/inf, zero);
-    /// assert_eq!(zero * 10.0, zero);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn zero() -> Self;
-    /// Returns `-0.0`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let inf: f32 = Float::infinity();
-    /// let zero: f32 = Float::zero();
-    /// let neg_zero: f32 = Float::neg_zero();
-    ///
-    /// assert_eq!(zero, neg_zero);
-    /// assert_eq!(7.0f32/inf, zero);
-    /// assert_eq!(zero * 10.0, zero);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn neg_zero() -> Self;
-    /// Returns `1.0`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let one: f32 = Float::one();
-    ///
-    /// assert_eq!(one, 1.0f32);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn one() -> Self;
-
-    // FIXME (#5527): These should be associated constants
-
-    /// Deprecated: use `std::f32::MANTISSA_DIGITS` or `std::f64::MANTISSA_DIGITS`
-    /// instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::MANTISSA_DIGITS` or \
-                           `std::f64::MANTISSA_DIGITS` as appropriate")]
-    fn mantissa_digits(unused_self: Option<Self>) -> usize;
-    /// Deprecated: use `std::f32::DIGITS` or `std::f64::DIGITS` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::DIGITS` or `std::f64::DIGITS` as appropriate")]
-    fn digits(unused_self: Option<Self>) -> usize;
-    /// Deprecated: use `std::f32::EPSILON` or `std::f64::EPSILON` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::EPSILON` or `std::f64::EPSILON` as appropriate")]
-    fn epsilon() -> Self;
-    /// Deprecated: use `std::f32::MIN_EXP` or `std::f64::MIN_EXP` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::MIN_EXP` or `std::f64::MIN_EXP` as appropriate")]
-    fn min_exp(unused_self: Option<Self>) -> isize;
-    /// Deprecated: use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` as appropriate")]
-    fn max_exp(unused_self: Option<Self>) -> isize;
-    /// Deprecated: use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` as appropriate")]
-    fn min_10_exp(unused_self: Option<Self>) -> isize;
-    /// Deprecated: use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` instead.
-    #[unstable(feature = "std_misc")]
-    #[deprecated(since = "1.0.0",
-                 reason = "use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` as appropriate")]
-    fn max_10_exp(unused_self: Option<Self>) -> isize;
-
-    /// Returns the smallest finite value that this type can represent.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x: f64 = Float::min_value();
-    ///
-    /// assert_eq!(x, f64::MIN);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn min_value() -> Self;
-    /// Returns the smallest normalized positive number that this type can represent.
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn min_pos_value(unused_self: Option<Self>) -> Self;
-    /// Returns the largest finite value that this type can represent.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x: f64 = Float::max_value();
-    /// assert_eq!(x, f64::MAX);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn max_value() -> Self;
-    /// Returns `true` if this value is `NaN` and false otherwise.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let nan = f64::NAN;
-    /// let f = 7.0;
-    ///
-    /// assert!(nan.is_nan());
-    /// assert!(!f.is_nan());
-    /// ```
-    #[unstable(feature = "std_misc", reason = "position is undecided")]
-    fn is_nan(self) -> bool;
-    /// Returns `true` if this value is positive infinity or negative infinity and
-    /// false otherwise.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f32;
-    ///
-    /// let f = 7.0f32;
-    /// let inf: f32 = Float::infinity();
-    /// let neg_inf: f32 = Float::neg_infinity();
-    /// let nan: f32 = f32::NAN;
-    ///
-    /// assert!(!f.is_infinite());
-    /// assert!(!nan.is_infinite());
-    ///
-    /// assert!(inf.is_infinite());
-    /// assert!(neg_inf.is_infinite());
-    /// ```
-    #[unstable(feature = "std_misc", reason = "position is undecided")]
-    fn is_infinite(self) -> bool;
-    /// Returns `true` if this number is neither infinite nor `NaN`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f32;
-    ///
-    /// let f = 7.0f32;
-    /// let inf: f32 = Float::infinity();
-    /// let neg_inf: f32 = Float::neg_infinity();
-    /// let nan: f32 = f32::NAN;
-    ///
-    /// assert!(f.is_finite());
-    ///
-    /// assert!(!nan.is_finite());
-    /// assert!(!inf.is_finite());
-    /// assert!(!neg_inf.is_finite());
-    /// ```
-    #[unstable(feature = "std_misc", reason = "position is undecided")]
-    fn is_finite(self) -> bool;
-
-    /// Returns `true` if the number is neither zero, infinite,
-    /// [subnormal][subnormal], or `NaN`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f32;
-    ///
-    /// let min = f32::MIN_POSITIVE; // 1.17549435e-38f32
-    /// let max = f32::MAX;
-    /// let lower_than_min = 1.0e-40_f32;
-    /// let zero = 0.0f32;
-    ///
-    /// assert!(min.is_normal());
-    /// assert!(max.is_normal());
-    ///
-    /// assert!(!zero.is_normal());
-    /// assert!(!f32::NAN.is_normal());
-    /// assert!(!f32::INFINITY.is_normal());
-    /// // Values between `0` and `min` are Subnormal.
-    /// assert!(!lower_than_min.is_normal());
-    /// ```
-    /// [subnormal]: http://en.wikipedia.org/wiki/Denormal_number
-    #[unstable(feature = "std_misc", reason = "position is undecided")]
-    fn is_normal(self) -> bool;
-
-    /// Returns the floating point category of the number. If only one property
-    /// is going to be tested, it is generally faster to use the specific
-    /// predicate instead.
-    ///
-    /// ```
-    /// use std::num::{Float, FpCategory};
-    /// use std::f32;
-    ///
-    /// let num = 12.4f32;
-    /// let inf = f32::INFINITY;
-    ///
-    /// assert_eq!(num.classify(), FpCategory::Normal);
-    /// assert_eq!(inf.classify(), FpCategory::Infinite);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn classify(self) -> FpCategory;
-
-    /// Returns the mantissa, base 2 exponent, and sign as integers, respectively.
-    /// The original number can be recovered by `sign * mantissa * 2 ^ exponent`.
-    /// The floating point encoding is documented in the [Reference][floating-point].
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let num = 2.0f32;
-    ///
-    /// // (8388608, -22, 1)
-    /// let (mantissa, exponent, sign) = num.integer_decode();
-    /// let sign_f = sign as f32;
-    /// let mantissa_f = mantissa as f32;
-    /// let exponent_f = num.powf(exponent as f32);
-    ///
-    /// // 1 * 8388608 * 2^(-22) == 2
-    /// let abs_difference = (sign_f * mantissa_f * exponent_f - num).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    /// [floating-point]: ../../../../../reference.html#machine-types
-    #[unstable(feature = "std_misc", reason = "signature is undecided")]
-    fn integer_decode(self) -> (u64, i16, i8);
-
-    /// Returns the largest integer less than or equal to a number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 3.99;
-    /// let g = 3.0;
-    ///
-    /// assert_eq!(f.floor(), 3.0);
-    /// assert_eq!(g.floor(), 3.0);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn floor(self) -> Self;
-    /// Returns the smallest integer greater than or equal to a number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 3.01;
-    /// let g = 4.0;
-    ///
-    /// assert_eq!(f.ceil(), 4.0);
-    /// assert_eq!(g.ceil(), 4.0);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn ceil(self) -> Self;
-    /// Returns the nearest integer to a number. Round half-way cases away from
-    /// `0.0`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 3.3;
-    /// let g = -3.3;
-    ///
-    /// assert_eq!(f.round(), 3.0);
-    /// assert_eq!(g.round(), -3.0);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn round(self) -> Self;
-    /// Returns the integer part of a number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 3.3;
-    /// let g = -3.7;
-    ///
-    /// assert_eq!(f.trunc(), 3.0);
-    /// assert_eq!(g.trunc(), -3.0);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn trunc(self) -> Self;
-    /// Returns the fractional part of a number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 3.5;
-    /// let y = -3.5;
-    /// let abs_difference_x = (x.fract() - 0.5).abs();
-    /// let abs_difference_y = (y.fract() - (-0.5)).abs();
-    ///
-    /// assert!(abs_difference_x < 1e-10);
-    /// assert!(abs_difference_y < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn fract(self) -> Self;
-    /// Computes the absolute value of `self`. Returns `Float::nan()` if the
-    /// number is `Float::nan()`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = 3.5;
-    /// let y = -3.5;
-    ///
-    /// let abs_difference_x = (x.abs() - x).abs();
-    /// let abs_difference_y = (y.abs() - (-y)).abs();
-    ///
-    /// assert!(abs_difference_x < 1e-10);
-    /// assert!(abs_difference_y < 1e-10);
-    ///
-    /// assert!(f64::NAN.abs().is_nan());
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn abs(self) -> Self;
-    /// Returns a number that represents the sign of `self`.
-    ///
-    /// - `1.0` if the number is positive, `+0.0` or `Float::infinity()`
-    /// - `-1.0` if the number is negative, `-0.0` or `Float::neg_infinity()`
-    /// - `Float::nan()` if the number is `Float::nan()`
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let f = 3.5;
-    ///
-    /// assert_eq!(f.signum(), 1.0);
-    /// assert_eq!(f64::NEG_INFINITY.signum(), -1.0);
-    ///
-    /// assert!(f64::NAN.signum().is_nan());
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn signum(self) -> Self;
-    /// Returns `true` if `self` is positive, including `+0.0` and
-    /// `Float::infinity()`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let nan: f64 = f64::NAN;
-    ///
-    /// let f = 7.0;
-    /// let g = -7.0;
-    ///
-    /// assert!(f.is_positive());
-    /// assert!(!g.is_positive());
-    /// // Requires both tests to determine if is `NaN`
-    /// assert!(!nan.is_positive() && !nan.is_negative());
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn is_positive(self) -> bool;
-    /// Returns `true` if `self` is negative, including `-0.0` and
-    /// `Float::neg_infinity()`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let nan = f64::NAN;
-    ///
-    /// let f = 7.0;
-    /// let g = -7.0;
-    ///
-    /// assert!(!f.is_negative());
-    /// assert!(g.is_negative());
-    /// // Requires both tests to determine if is `NaN`.
-    /// assert!(!nan.is_positive() && !nan.is_negative());
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn is_negative(self) -> bool;
-
-    /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
-    /// error. This produces a more accurate result with better performance than
-    /// a separate multiplication operation followed by an add.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let m = 10.0;
-    /// let x = 4.0;
-    /// let b = 60.0;
-    ///
-    /// // 100.0
-    /// let abs_difference = (m.mul_add(x, b) - (m*x + b)).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn mul_add(self, a: Self, b: Self) -> Self;
-    /// Takes the reciprocal (inverse) of a number, `1/x`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 2.0;
-    /// let abs_difference = (x.recip() - (1.0/x)).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn recip(self) -> Self;
-
-    /// Raises a number to an integer power.
-    ///
-    /// Using this function is generally faster than using `powf`
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 2.0;
-    /// let abs_difference = (x.powi(2) - x*x).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn powi(self, n: i32) -> Self;
-    /// Raises a number to a floating point power.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 2.0;
-    /// let abs_difference = (x.powf(2.0) - x*x).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn powf(self, n: Self) -> Self;
-    /// Takes the square root of a number.
-    ///
-    /// Returns NaN if `self` is a negative number.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let positive = 4.0;
-    /// let negative = -4.0;
-    ///
-    /// let abs_difference = (positive.sqrt() - 2.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// assert!(negative.sqrt().is_nan());
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn sqrt(self) -> Self;
-
-    /// Takes the reciprocal (inverse) square root of a number, `1/sqrt(x)`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let f = 4.0;
-    ///
-    /// let abs_difference = (f.rsqrt() - 0.5).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn rsqrt(self) -> Self;
-
-    /// Returns `e^(self)`, (the exponential function).
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let one = 1.0;
-    /// // e^1
-    /// let e = one.exp();
-    ///
-    /// // ln(e) - 1 == 0
-    /// let abs_difference = (e.ln() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn exp(self) -> Self;
-    /// Returns `2^(self)`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 2.0;
-    ///
-    /// // 2^2 - 4 == 0
-    /// let abs_difference = (f.exp2() - 4.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn exp2(self) -> Self;
-    /// Returns the natural logarithm of the number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let one = 1.0;
-    /// // e^1
-    /// let e = one.exp();
-    ///
-    /// // ln(e) - 1 == 0
-    /// let abs_difference = (e.ln() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn ln(self) -> Self;
-    /// Returns the logarithm of the number with respect to an arbitrary base.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let ten = 10.0;
-    /// let two = 2.0;
-    ///
-    /// // log10(10) - 1 == 0
-    /// let abs_difference_10 = (ten.log(10.0) - 1.0).abs();
-    ///
-    /// // log2(2) - 1 == 0
-    /// let abs_difference_2 = (two.log(2.0) - 1.0).abs();
-    ///
-    /// assert!(abs_difference_10 < 1e-10);
-    /// assert!(abs_difference_2 < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn log(self, base: Self) -> Self;
-    /// Returns the base 2 logarithm of the number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let two = 2.0;
-    ///
-    /// // log2(2) - 1 == 0
-    /// let abs_difference = (two.log2() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn log2(self) -> Self;
-    /// Returns the base 10 logarithm of the number.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let ten = 10.0;
-    ///
-    /// // log10(10) - 1 == 0
-    /// let abs_difference = (ten.log10() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn log10(self) -> Self;
-
-    /// Converts radians to degrees.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64::consts;
-    ///
-    /// let angle = consts::PI;
-    ///
-    /// let abs_difference = (angle.to_degrees() - 180.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "desirability is unclear")]
-    fn to_degrees(self) -> Self;
-    /// Converts degrees to radians.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    /// use std::f64::consts;
-    ///
-    /// let angle = 180.0;
-    ///
-    /// let abs_difference = (angle.to_radians() - consts::PI).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "desirability is unclear")]
-    fn to_radians(self) -> Self;
-    /// Constructs a floating point number of `x*2^exp`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// // 3*2^2 - 12 == 0
-    /// let abs_difference = (Float::ldexp(3.0, 2) - 12.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "pending integer conventions")]
-    fn ldexp(self, exp: isize) -> Self;
-    /// Breaks the number into a normalized fraction and a base-2 exponent,
-    /// satisfying:
-    ///
-    ///  * `self = x * 2^exp`
-    ///  * `0.5 <= abs(x) < 1.0`
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 4.0;
-    ///
-    /// // (1/2)*2^3 -> 1 * 8/2 -> 4.0
-    /// let f = x.frexp();
-    /// let abs_difference_0 = (f.0 - 0.5).abs();
-    /// let abs_difference_1 = (f.1 as f64 - 3.0).abs();
-    ///
-    /// assert!(abs_difference_0 < 1e-10);
-    /// assert!(abs_difference_1 < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "pending integer conventions")]
-    fn frexp(self) -> (Self, isize);
-    /// Returns the next representable floating-point value in the direction of
-    /// `other`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 1.0f32;
-    ///
-    /// let abs_diff = (x.next_after(2.0) - 1.00000011920928955078125_f32).abs();
-    ///
-    /// assert!(abs_diff < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn next_after(self, other: Self) -> Self;
-
-    /// Returns the maximum of the two numbers.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 1.0;
-    /// let y = 2.0;
-    ///
-    /// assert_eq!(x.max(y), y);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn max(self, other: Self) -> Self;
-    /// Returns the minimum of the two numbers.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 1.0;
-    /// let y = 2.0;
-    ///
-    /// assert_eq!(x.min(y), x);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn min(self, other: Self) -> Self;
-
-    /// The positive difference of two numbers.
-    ///
-    /// * If `self <= other`: `0:0`
-    /// * Else: `self - other`
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 3.0;
-    /// let y = -3.0;
-    ///
-    /// let abs_difference_x = (x.abs_sub(1.0) - 2.0).abs();
-    /// let abs_difference_y = (y.abs_sub(1.0) - 0.0).abs();
-    ///
-    /// assert!(abs_difference_x < 1e-10);
-    /// assert!(abs_difference_y < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "may be renamed")]
-    fn abs_sub(self, other: Self) -> Self;
-    /// Takes the cubic root of a number.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 8.0;
-    ///
-    /// // x^(1/3) - 2 == 0
-    /// let abs_difference = (x.cbrt() - 2.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "may be renamed")]
-    fn cbrt(self) -> Self;
-    /// Calculates the length of the hypotenuse of a right-angle triangle given
-    /// legs of length `x` and `y`.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 2.0;
-    /// let y = 3.0;
-    ///
-    /// // sqrt(x^2 + y^2)
-    /// let abs_difference = (x.hypot(y) - (x.powi(2) + y.powi(2)).sqrt()).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc",
-               reason = "unsure about its place in the world")]
-    fn hypot(self, other: Self) -> Self;
-
-    /// Computes the sine of a number (in radians).
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = f64::consts::PI/2.0;
-    ///
-    /// let abs_difference = (x.sin() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn sin(self) -> Self;
-    /// Computes the cosine of a number (in radians).
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = 2.0*f64::consts::PI;
-    ///
-    /// let abs_difference = (x.cos() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn cos(self) -> Self;
-    /// Computes the tangent of a number (in radians).
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = f64::consts::PI/4.0;
-    /// let abs_difference = (x.tan() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-14);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn tan(self) -> Self;
-    /// Computes the arcsine of a number. Return value is in radians in
-    /// the range [-pi/2, pi/2] or NaN if the number is outside the range
-    /// [-1, 1].
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let f = f64::consts::PI / 2.0;
-    ///
-    /// // asin(sin(pi/2))
-    /// let abs_difference = (f.sin().asin() - f64::consts::PI / 2.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn asin(self) -> Self;
-    /// Computes the arccosine of a number. Return value is in radians in
-    /// the range [0, pi] or NaN if the number is outside the range
-    /// [-1, 1].
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let f = f64::consts::PI / 4.0;
-    ///
-    /// // acos(cos(pi/4))
-    /// let abs_difference = (f.cos().acos() - f64::consts::PI / 4.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn acos(self) -> Self;
-    /// Computes the arctangent of a number. Return value is in radians in the
-    /// range [-pi/2, pi/2];
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let f = 1.0;
-    ///
-    /// // atan(tan(1))
-    /// let abs_difference = (f.tan().atan() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn atan(self) -> Self;
-    /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
-    ///
-    /// * `x = 0`, `y = 0`: `0`
-    /// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
-    /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
-    /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let pi = f64::consts::PI;
-    /// // All angles from horizontal right (+x)
-    /// // 45 deg counter-clockwise
-    /// let x1 = 3.0;
-    /// let y1 = -3.0;
-    ///
-    /// // 135 deg clockwise
-    /// let x2 = -3.0;
-    /// let y2 = 3.0;
-    ///
-    /// let abs_difference_1 = (y1.atan2(x1) - (-pi/4.0)).abs();
-    /// let abs_difference_2 = (y2.atan2(x2) - 3.0*pi/4.0).abs();
-    ///
-    /// assert!(abs_difference_1 < 1e-10);
-    /// assert!(abs_difference_2 < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn atan2(self, other: Self) -> Self;
-    /// Simultaneously computes the sine and cosine of the number, `x`. Returns
-    /// `(sin(x), cos(x))`.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = f64::consts::PI/4.0;
-    /// let f = x.sin_cos();
-    ///
-    /// let abs_difference_0 = (f.0 - x.sin()).abs();
-    /// let abs_difference_1 = (f.1 - x.cos()).abs();
-    ///
-    /// assert!(abs_difference_0 < 1e-10);
-    /// assert!(abs_difference_0 < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn sin_cos(self) -> (Self, Self);
-
-    /// Returns `e^(self) - 1` in a way that is accurate even if the
-    /// number is close to zero.
-    ///
-    /// ```
-    /// # #![feature(std_misc)]
-    /// use std::num::Float;
-    ///
-    /// let x = 7.0;
-    ///
-    /// // e^(ln(7)) - 1
-    /// let abs_difference = (x.ln().exp_m1() - 6.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "may be renamed")]
-    fn exp_m1(self) -> Self;
-    /// Returns `ln(1+n)` (natural logarithm) more accurately than if
-    /// the operations were performed separately.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let x = f64::consts::E - 1.0;
-    ///
-    /// // ln(1 + (e - 1)) == ln(e) == 1
-    /// let abs_difference = (x.ln_1p() - 1.0).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[unstable(feature = "std_misc", reason = "may be renamed")]
-    fn ln_1p(self) -> Self;
-
-    /// Hyperbolic sine function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let e = f64::consts::E;
-    /// let x = 1.0;
-    ///
-    /// let f = x.sinh();
-    /// // Solving sinh() at 1 gives `(e^2-1)/(2e)`
-    /// let g = (e*e - 1.0)/(2.0*e);
-    /// let abs_difference = (f - g).abs();
-    ///
-    /// assert!(abs_difference < 1e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn sinh(self) -> Self;
-    /// Hyperbolic cosine function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let e = f64::consts::E;
-    /// let x = 1.0;
-    /// let f = x.cosh();
-    /// // Solving cosh() at 1 gives this result
-    /// let g = (e*e + 1.0)/(2.0*e);
-    /// let abs_difference = (f - g).abs();
-    ///
-    /// // Same result
-    /// assert!(abs_difference < 1.0e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn cosh(self) -> Self;
-    /// Hyperbolic tangent function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let e = f64::consts::E;
-    /// let x = 1.0;
-    ///
-    /// let f = x.tanh();
-    /// // Solving tanh() at 1 gives `(1 - e^(-2))/(1 + e^(-2))`
-    /// let g = (1.0 - e.powi(-2))/(1.0 + e.powi(-2));
-    /// let abs_difference = (f - g).abs();
-    ///
-    /// assert!(abs_difference < 1.0e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn tanh(self) -> Self;
-    /// Inverse hyperbolic sine function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 1.0;
-    /// let f = x.sinh().asinh();
-    ///
-    /// let abs_difference = (f - x).abs();
-    ///
-    /// assert!(abs_difference < 1.0e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn asinh(self) -> Self;
-    /// Inverse hyperbolic cosine function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    ///
-    /// let x = 1.0;
-    /// let f = x.cosh().acosh();
-    ///
-    /// let abs_difference = (f - x).abs();
-    ///
-    /// assert!(abs_difference < 1.0e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn acosh(self) -> Self;
-    /// Inverse hyperbolic tangent function.
-    ///
-    /// ```
-    /// use std::num::Float;
-    /// use std::f64;
-    ///
-    /// let e = f64::consts::E;
-    /// let f = e.tanh().atanh();
-    ///
-    /// let abs_difference = (f - e).abs();
-    ///
-    /// assert!(abs_difference < 1.0e-10);
-    /// ```
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn atanh(self) -> Self;
-}
-
 /// Helper function for testing numeric operations
 #[cfg(test)]
 pub fn test_num<T>(ten: T, two: T) where
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
deleted file mode 100644
index ce1da4742d1..00000000000
--- a/src/libstd/num/strconv.rs
+++ /dev/null
@@ -1,556 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(missing_docs)]
-#![allow(deprecated)]
-
-use self::ExponentFormat::*;
-use self::SignificantDigits::*;
-use self::SignFormat::*;
-
-use char;
-use num::{self, Int, Float, ToPrimitive};
-use num::FpCategory as Fp;
-use ops::FnMut;
-use string::String;
-use vec::Vec;
-
-/// A flag that specifies whether to use exponential (scientific) notation.
-#[derive(Copy, Clone)]
-pub enum ExponentFormat {
-    /// Do not use exponential notation.
-    ExpNone,
-    /// Use exponential notation with the exponent having a base of 10 and the
-    /// exponent sign being `e` or `E`. For example, 1000 would be printed
-    /// 1e3.
-    ExpDec,
-    /// Use exponential notation with the exponent having a base of 2 and the
-    /// exponent sign being `p` or `P`. For example, 8 would be printed 1p3.
-    ExpBin,
-}
-
-/// The number of digits used for emitting the fractional part of a number, if
-/// any.
-#[derive(Copy, Clone)]
-pub enum SignificantDigits {
-    /// All calculable digits will be printed.
-    ///
-    /// Note that bignums or fractions may cause a surprisingly large number
-    /// of digits to be printed.
-    DigAll,
-
-    /// At most the given number of digits will be printed, truncating any
-    /// trailing zeroes.
-    DigMax(usize),
-
-    /// Precisely the given number of digits will be printed.
-    DigExact(usize)
-}
-
-/// How to emit the sign of a number.
-#[derive(Copy, Clone)]
-pub enum SignFormat {
-    /// No sign will be printed. The exponent sign will also be emitted.
-    SignNone,
-    /// `-` will be printed for negative values, but no sign will be emitted
-    /// for positive numbers.
-    SignNeg,
-    /// `+` will be printed for positive values, and `-` will be printed for
-    /// negative values.
-    SignAll,
-}
-
-/// Converts an integral number to its string representation as a byte vector.
-/// This is meant to be a common base implementation for all integral string
-/// conversion functions like `to_string()` or `to_str_radix()`.
-///
-/// # Arguments
-///
-/// - `num`           - The number to convert. Accepts any number that
-///                     implements the numeric traits.
-/// - `radix`         - Base to use. Accepts only the values 2-36.
-/// - `sign`          - How to emit the sign. Options are:
-///     - `SignNone`: No sign at all. Basically emits `abs(num)`.
-///     - `SignNeg`:  Only `-` on negative values.
-///     - `SignAll`:  Both `+` on positive, and `-` on negative numbers.
-/// - `f`             - a callback which will be invoked for each ascii character
-///                     which composes the string representation of this integer
-///
-/// # Panics
-///
-/// - Panics if `radix` < 2 or `radix` > 36.
-fn int_to_str_bytes_common<T, F>(num: T, radix: usize, sign: SignFormat, mut f: F) where
-    T: Int,
-    F: FnMut(u8),
-{
-    assert!(2 <= radix && radix <= 36);
-
-    let _0: T = Int::zero();
-
-    let neg = num < _0;
-    let radix_gen: T = num::cast(radix).unwrap();
-
-    let mut deccum = num;
-    // This is just for integral types, the largest of which is a u64. The
-    // smallest base that we can have is 2, so the most number of digits we're
-    // ever going to have is 64
-    let mut buf = [0; 64];
-    let mut cur = 0;
-
-    // Loop at least once to make sure at least a `0` gets emitted.
-    loop {
-        // Calculate the absolute value of each digit instead of only
-        // doing it once for the whole number because a
-        // representable negative number doesn't necessary have an
-        // representable additive inverse of the same type
-        // (See twos complement). But we assume that for the
-        // numbers [-35 .. 0] we always have [0 .. 35].
-        let current_digit_signed = deccum % radix_gen;
-        let current_digit = if current_digit_signed < _0 {
-            _0 - current_digit_signed
-        } else {
-            current_digit_signed
-        };
-        buf[cur] = match current_digit.to_u8().unwrap() {
-            i @ 0...9 => b'0' + i,
-            i         => b'a' + (i - 10),
-        };
-        cur += 1;
-
-        deccum = deccum / radix_gen;
-        // No more digits to calculate for the non-fractional part -> break
-        if deccum == _0 { break; }
-    }
-
-    // Decide what sign to put in front
-    match sign {
-        SignNeg | SignAll if neg => { f(b'-'); }
-        SignAll => { f(b'+'); }
-        _ => ()
-    }
-
-    // We built the number in reverse order, so un-reverse it here
-    while cur > 0 {
-        cur -= 1;
-        f(buf[cur]);
-    }
-}
-
-/// Converts a number to its string representation as a byte vector.
-/// This is meant to be a common base implementation for all numeric string
-/// conversion functions like `to_string()` or `to_str_radix()`.
-///
-/// # Arguments
-///
-/// - `num`           - The number to convert. Accepts any number that
-///                     implements the numeric traits.
-/// - `radix`         - Base to use. Accepts only the values 2-36. If the exponential notation
-///                     is used, then this base is only used for the significand. The exponent
-///                     itself always printed using a base of 10.
-/// - `negative_zero` - Whether to treat the special value `-0` as
-///                     `-0` or as `+0`.
-/// - `sign`          - How to emit the sign. See `SignFormat`.
-/// - `digits`        - The amount of digits to use for emitting the fractional
-///                     part, if any. See `SignificantDigits`.
-/// - `exp_format`   - Whether or not to use the exponential (scientific) notation.
-///                    See `ExponentFormat`.
-/// - `exp_capital`   - Whether or not to use a capital letter for the exponent sign, if
-///                     exponential notation is desired.
-///
-/// # Return value
-///
-/// A tuple containing the byte vector, and a boolean flag indicating
-/// whether it represents a special value like `inf`, `-inf`, `NaN` or not.
-/// It returns a tuple because there can be ambiguity between a special value
-/// and a number representation at higher bases.
-///
-/// # Panics
-///
-/// - Panics if `radix` < 2 or `radix` > 36.
-/// - Panics if `radix` > 14 and `exp_format` is `ExpDec` due to conflict
-///   between digit and exponent sign `'e'`.
-/// - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
-///   between digit and exponent sign `'p'`.
-pub fn float_to_str_bytes_common<T: Float>(
-        num: T, radix: u32, negative_zero: bool,
-        sign: SignFormat, digits: SignificantDigits, exp_format: ExponentFormat, exp_upper: bool
-        ) -> (Vec<u8>, bool) {
-    assert!(2 <= radix && radix <= 36);
-    match exp_format {
-        ExpDec if radix >= DIGIT_E_RADIX       // decimal exponent 'e'
-          => panic!("float_to_str_bytes_common: radix {} incompatible with \
-                    use of 'e' as decimal exponent", radix),
-        ExpBin if radix >= DIGIT_P_RADIX       // binary exponent 'p'
-          => panic!("float_to_str_bytes_common: radix {} incompatible with \
-                    use of 'p' as binary exponent", radix),
-        _ => ()
-    }
-
-    let _0: T = Float::zero();
-    let _1: T = Float::one();
-
-    match num.classify() {
-        Fp::Nan => { return (b"NaN".to_vec(), true); }
-        Fp::Infinite if num > _0 => {
-            return match sign {
-                SignAll => (b"+inf".to_vec(), true),
-                _       => (b"inf".to_vec(), true)
-            };
-        }
-        Fp::Infinite if num < _0 => {
-            return match sign {
-                SignNone => (b"inf".to_vec(), true),
-                _        => (b"-inf".to_vec(), true),
-            };
-        }
-        _ => {}
-    }
-
-    let neg = num < _0 || (negative_zero && _1 / num == Float::neg_infinity());
-    let mut buf = Vec::new();
-    let radix_gen: T = num::cast(radix as isize).unwrap();
-
-    let (num, exp) = match exp_format {
-        ExpNone => (num, 0),
-        ExpDec | ExpBin => {
-            if num == _0 {
-                (num, 0)
-            } else {
-                let (exp, exp_base) = match exp_format {
-                    ExpDec => (num.abs().log10().floor(), num::cast::<f64, T>(10.0f64).unwrap()),
-                    ExpBin => (num.abs().log2().floor(), num::cast::<f64, T>(2.0f64).unwrap()),
-                    ExpNone => unreachable!()
-                };
-
-                (num / exp_base.powf(exp), num::cast::<T, i32>(exp).unwrap())
-            }
-        }
-    };
-
-    // First emit the non-fractional part, looping at least once to make
-    // sure at least a `0` gets emitted.
-    let mut deccum = num.trunc();
-    loop {
-        // Calculate the absolute value of each digit instead of only
-        // doing it once for the whole number because a
-        // representable negative number doesn't necessary have an
-        // representable additive inverse of the same type
-        // (See twos complement). But we assume that for the
-        // numbers [-35 .. 0] we always have [0 .. 35].
-        let current_digit = (deccum % radix_gen).abs();
-
-        // Decrease the deccumulator one digit at a time
-        deccum = deccum / radix_gen;
-        deccum = deccum.trunc();
-
-        buf.push(char::from_digit(current_digit.to_isize().unwrap() as u32, radix)
-             .unwrap() as u8);
-
-        // No more digits to calculate for the non-fractional part -> break
-        if deccum == _0 { break; }
-    }
-
-    // If limited digits, calculate one digit more for rounding.
-    let (limit_digits, digit_count, exact) = match digits {
-        DigAll          => (false, 0,       false),
-        DigMax(count)   => (true,  count+1, false),
-        DigExact(count) => (true,  count+1, true)
-    };
-
-    // Decide what sign to put in front
-    match sign {
-        SignNeg | SignAll if neg => {
-            buf.push(b'-');
-        }
-        SignAll => {
-            buf.push(b'+');
-        }
-        _ => ()
-    }
-
-    buf.reverse();
-
-    // Remember start of the fractional digits.
-    // Points one beyond end of buf if none get generated,
-    // or at the '.' otherwise.
-    let start_fractional_digits = buf.len();
-
-    // Now emit the fractional part, if any
-    deccum = num.fract();
-    if deccum != _0 || (limit_digits && exact && digit_count > 0) {
-        buf.push(b'.');
-        let mut dig = 0;
-
-        // calculate new digits while
-        // - there is no limit and there are digits left
-        // - or there is a limit, it's not reached yet and
-        //   - it's exact
-        //   - or it's a maximum, and there are still digits left
-        while (!limit_digits && deccum != _0)
-           || (limit_digits && dig < digit_count && (
-                   exact
-                || (!exact && deccum != _0)
-              )
-        ) {
-            // Shift first fractional digit into the integer part
-            deccum = deccum * radix_gen;
-
-            // Calculate the absolute value of each digit.
-            // See note in first loop.
-            let current_digit = deccum.trunc().abs();
-
-            buf.push(char::from_digit(
-                current_digit.to_isize().unwrap() as u32, radix).unwrap() as u8);
-
-            // Decrease the deccumulator one fractional digit at a time
-            deccum = deccum.fract();
-            dig += 1;
-        }
-
-        // If digits are limited, and that limit has been reached,
-        // cut off the one extra digit, and depending on its value
-        // round the remaining ones.
-        if limit_digits && dig == digit_count {
-            let ascii2value = |chr: u8| {
-                (chr as char).to_digit(radix).unwrap()
-            };
-            let value2ascii = |val: u32| {
-                char::from_digit(val, radix).unwrap() as u8
-            };
-
-            let extra_digit = ascii2value(buf.pop().unwrap());
-            if extra_digit >= radix / 2 { // -> need to round
-                let mut i: isize = buf.len() as isize - 1;
-                loop {
-                    // If reached left end of number, have to
-                    // insert additional digit:
-                    if i < 0
-                    || buf[i as usize] == b'-'
-                    || buf[i as usize] == b'+' {
-                        buf.insert((i + 1) as usize, value2ascii(1));
-                        break;
-                    }
-
-                    // Skip the '.'
-                    if buf[i as usize] == b'.' { i -= 1; continue; }
-
-                    // Either increment the digit,
-                    // or set to 0 if max and carry the 1.
-                    let current_digit = ascii2value(buf[i as usize]);
-                    if current_digit < (radix - 1) {
-                        buf[i as usize] = value2ascii(current_digit+1);
-                        break;
-                    } else {
-                        buf[i as usize] = value2ascii(0);
-                        i -= 1;
-                    }
-                }
-            }
-        }
-    }
-
-    // if number of digits is not exact, remove all trailing '0's up to
-    // and including the '.'
-    if !exact {
-        let buf_max_i = buf.len() - 1;
-
-        // index to truncate from
-        let mut i = buf_max_i;
-
-        // discover trailing zeros of fractional part
-        while i > start_fractional_digits && buf[i] == b'0' {
-            i -= 1;
-        }
-
-        // Only attempt to truncate digits if buf has fractional digits
-        if i >= start_fractional_digits {
-            // If buf ends with '.', cut that too.
-            if buf[i] == b'.' { i -= 1 }
-
-            // only resize buf if we actually remove digits
-            if i < buf_max_i {
-                buf = buf[.. (i + 1)].to_vec();
-            }
-        }
-    } // If exact and trailing '.', just cut that
-    else {
-        let max_i = buf.len() - 1;
-        if buf[max_i] == b'.' {
-            buf = buf[.. max_i].to_vec();
-        }
-    }
-
-    match exp_format {
-        ExpNone => (),
-        _ => {
-            buf.push(match exp_format {
-                ExpDec if exp_upper => 'E',
-                ExpDec if !exp_upper => 'e',
-                ExpBin if exp_upper => 'P',
-                ExpBin if !exp_upper => 'p',
-                _ => unreachable!()
-            } as u8);
-
-            int_to_str_bytes_common(exp, 10, sign, |c| buf.push(c));
-        }
-    }
-
-    (buf, false)
-}
-
-/// Converts a number to its string representation. This is a wrapper for
-/// `to_str_bytes_common()`, for details see there.
-#[inline]
-pub fn float_to_str_common<T: Float>(
-        num: T, radix: u32, negative_zero: bool,
-        sign: SignFormat, digits: SignificantDigits, exp_format: ExponentFormat, exp_capital: bool
-        ) -> (String, bool) {
-    let (bytes, special) = float_to_str_bytes_common(num, radix,
-                               negative_zero, sign, digits, exp_format, exp_capital);
-    (String::from_utf8(bytes).unwrap(), special)
-}
-
-// Some constants for from_str_bytes_common's input validation,
-// they define minimum radix values for which the character is a valid digit.
-const DIGIT_P_RADIX: u32 = ('p' as u32) - ('a' as u32) + 11;
-const DIGIT_E_RADIX: u32 = ('e' as u32) - ('a' as u32) + 11;
-
-#[cfg(test)]
-mod tests {
-    use core::num::wrapping::WrappingOps;
-    use string::ToString;
-
-    #[test]
-    fn test_int_to_str_overflow() {
-        let mut i8_val: i8 = 127;
-        assert_eq!(i8_val.to_string(), "127");
-
-        i8_val = i8_val.wrapping_add(1);
-        assert_eq!(i8_val.to_string(), "-128");
-
-        let mut i16_val: i16 = 32_767;
-        assert_eq!(i16_val.to_string(), "32767");
-
-        i16_val = i16_val.wrapping_add(1);
-        assert_eq!(i16_val.to_string(), "-32768");
-
-        let mut i32_val: i32 = 2_147_483_647;
-        assert_eq!(i32_val.to_string(), "2147483647");
-
-        i32_val = i32_val.wrapping_add(1);
-        assert_eq!(i32_val.to_string(), "-2147483648");
-
-        let mut i64_val: i64 = 9_223_372_036_854_775_807;
-        assert_eq!(i64_val.to_string(), "9223372036854775807");
-
-        i64_val = i64_val.wrapping_add(1);
-        assert_eq!(i64_val.to_string(), "-9223372036854775808");
-    }
-}
-
-#[cfg(test)]
-mod bench {
-    #![allow(deprecated)] // rand
-    extern crate test;
-
-    mod usize {
-        use super::test::Bencher;
-        use rand::{thread_rng, Rng};
-        use std::fmt;
-
-        #[inline]
-        fn to_string(x: usize, base: u8) {
-            format!("{}", fmt::radix(x, base));
-        }
-
-        #[bench]
-        fn to_str_bin(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<usize>(), 2); })
-        }
-
-        #[bench]
-        fn to_str_oct(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<usize>(), 8); })
-        }
-
-        #[bench]
-        fn to_str_dec(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<usize>(), 10); })
-        }
-
-        #[bench]
-        fn to_str_hex(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<usize>(), 16); })
-        }
-
-        #[bench]
-        fn to_str_base_36(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<usize>(), 36); })
-        }
-    }
-
-    mod isize {
-        use super::test::Bencher;
-        use rand::{thread_rng, Rng};
-        use std::fmt;
-
-        #[inline]
-        fn to_string(x: isize, base: u8) {
-            format!("{}", fmt::radix(x, base));
-        }
-
-        #[bench]
-        fn to_str_bin(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<isize>(), 2); })
-        }
-
-        #[bench]
-        fn to_str_oct(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<isize>(), 8); })
-        }
-
-        #[bench]
-        fn to_str_dec(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<isize>(), 10); })
-        }
-
-        #[bench]
-        fn to_str_hex(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<isize>(), 16); })
-        }
-
-        #[bench]
-        fn to_str_base_36(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { to_string(rng.gen::<isize>(), 36); })
-        }
-    }
-
-    mod f64 {
-        use super::test::Bencher;
-        use rand::{thread_rng, Rng};
-        use f64;
-
-        #[bench]
-        fn float_to_string(b: &mut Bencher) {
-            let mut rng = thread_rng();
-            b.iter(|| { f64::to_string(rng.gen()); })
-        }
-    }
-}