From 440e835967dd4bac67a7b20ea8b063dfa347891e Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Tue, 17 Jul 2018 15:03:39 -0500 Subject: [PATCH] Enable tests and expose --- library/compiler-builtins/libm/src/lib.rs | 2 -- library/compiler-builtins/libm/src/math/mod.rs | 3 ++- library/compiler-builtins/libm/test-generator/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/library/compiler-builtins/libm/src/lib.rs b/library/compiler-builtins/libm/src/lib.rs index 1837b9c1f9ed..06991effe1d7 100644 --- a/library/compiler-builtins/libm/src/lib.rs +++ b/library/compiler-builtins/libm/src/lib.rs @@ -343,7 +343,6 @@ pub trait F64Ext: private::Sealed + Sized { // NOTE depends on unstable intrinsics::powif64 // fn powi(self, n: i32) -> Self; - #[cfg(todo)] fn powf(self, n: Self) -> Self; fn sqrt(self) -> Self; @@ -463,7 +462,6 @@ impl F64Ext for f64 { } } - #[cfg(todo)] #[inline] fn powf(self, n: Self) -> Self { pow(self, n) diff --git a/library/compiler-builtins/libm/src/math/mod.rs b/library/compiler-builtins/libm/src/math/mod.rs index 754efa9f6dac..6dd362d00945 100644 --- a/library/compiler-builtins/libm/src/math/mod.rs +++ b/library/compiler-builtins/libm/src/math/mod.rs @@ -50,6 +50,7 @@ mod log2; mod log2f; mod logf; mod powf; +mod pow; mod round; mod roundf; mod scalbn; @@ -111,6 +112,7 @@ pub use self::log2::log2; pub use self::log2f::log2f; pub use self::logf::logf; pub use self::powf::powf; +pub use self::pow::pow; pub use self::round::round; pub use self::roundf::roundf; pub use self::scalbn::scalbn; @@ -167,7 +169,6 @@ fn get_low_word(x: f64) -> u32 { x.to_bits() as u32 } -#[allow(dead_code)] #[inline] fn with_set_high_word(f: f64, hi: u32) -> f64 { let mut tmp = f.to_bits(); diff --git a/library/compiler-builtins/libm/test-generator/src/main.rs b/library/compiler-builtins/libm/test-generator/src/main.rs index 09a9cb8f5887..4c4e420a2852 100644 --- a/library/compiler-builtins/libm/test-generator/src/main.rs +++ b/library/compiler-builtins/libm/test-generator/src/main.rs @@ -774,7 +774,7 @@ f64f64_f64! { fdim, fmod, hypot, - // pow, + pow, } // With signature `fn(f64, f64, f64) -> f64`