diff --git a/library/compiler-builtins/libm/src/math/service/cosdf.rs b/library/compiler-builtins/libm/src/math/cosdf.rs similarity index 100% rename from library/compiler-builtins/libm/src/math/service/cosdf.rs rename to library/compiler-builtins/libm/src/math/cosdf.rs diff --git a/library/compiler-builtins/libm/src/math/cosf.rs b/library/compiler-builtins/libm/src/math/cosf.rs index b1aefd5e32b7..f63724e791ea 100644 --- a/library/compiler-builtins/libm/src/math/cosf.rs +++ b/library/compiler-builtins/libm/src/math/cosf.rs @@ -1,4 +1,4 @@ -use super::service::{cosdf, sindf, rem_pio2f}; +use super::{cosdf, sindf, rem_pio2f}; use core::f64::consts::FRAC_PI_2; diff --git a/library/compiler-builtins/libm/src/math/mod.rs b/library/compiler-builtins/libm/src/math/mod.rs index bc69aca0f61d..b8de3c733338 100644 --- a/library/compiler-builtins/libm/src/math/mod.rs +++ b/library/compiler-builtins/libm/src/math/mod.rs @@ -17,8 +17,6 @@ mod expf; mod floor; mod cosf; -mod service; - pub use self::{ fabs::fabs, fabsf::fabsf, @@ -34,6 +32,18 @@ pub use self::{ cosf::cosf, }; +mod sindf; +mod cosdf; +mod rem_pio2f; +mod rem_pio2_large; + +use self::{ + sindf::sindf, + cosdf::cosdf, + rem_pio2f::rem_pio2f, + rem_pio2_large::rem_pio2_large, +}; + fn isnanf(x: f32) -> bool { x.to_bits() & 0x7fffffff > 0x7f800000 } diff --git a/library/compiler-builtins/libm/src/math/service/rem_pio2_large.rs b/library/compiler-builtins/libm/src/math/rem_pio2_large.rs similarity index 99% rename from library/compiler-builtins/libm/src/math/service/rem_pio2_large.rs rename to library/compiler-builtins/libm/src/math/rem_pio2_large.rs index 017fc88bae2e..deb985f1d1cc 100644 --- a/library/compiler-builtins/libm/src/math/service/rem_pio2_large.rs +++ b/library/compiler-builtins/libm/src/math/rem_pio2_large.rs @@ -1,5 +1,5 @@ -use ::scalbn; -use ::F64Ext; +use super::scalbn; +use super::floor; /// double x[],y[]; int e0,nx,prec; /// @@ -323,8 +323,8 @@ pub(crate) fn rem_pio2_large(x : &[f64], y : &mut [f64], e0 : i32, prec : usize) } /* compute n */ - z = scalbn(z, q0); /* actual value of z */ - z -= 8.0*(z*0.125).floor(); /* trim off integer >= 8 */ + z = scalbn(z, q0); /* actual value of z */ + z -= 8.0*floor(z*0.125); /* trim off integer >= 8 */ n = z as i32; z -= n as f64; ih = 0; diff --git a/library/compiler-builtins/libm/src/math/service/rem_pio2f.rs b/library/compiler-builtins/libm/src/math/rem_pio2f.rs similarity index 100% rename from library/compiler-builtins/libm/src/math/service/rem_pio2f.rs rename to library/compiler-builtins/libm/src/math/rem_pio2f.rs diff --git a/library/compiler-builtins/libm/src/math/service/mod.rs b/library/compiler-builtins/libm/src/math/service/mod.rs deleted file mode 100644 index 96bb09431bad..000000000000 --- a/library/compiler-builtins/libm/src/math/service/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -mod sindf; -mod cosdf; -mod rem_pio2f; -mod rem_pio2_large; - -pub(crate) use self::{ - cosdf::cosdf, - sindf::sindf, - rem_pio2f::rem_pio2f, - rem_pio2_large::rem_pio2_large, -}; diff --git a/library/compiler-builtins/libm/src/math/service/sindf.rs b/library/compiler-builtins/libm/src/math/sindf.rs similarity index 100% rename from library/compiler-builtins/libm/src/math/service/sindf.rs rename to library/compiler-builtins/libm/src/math/sindf.rs