Merge pull request #196 from Schultzer/add-remainder

Add remainder
This commit is contained in:
Alex Crichton
2019-07-04 06:45:20 +02:00
committed by GitHub
3 changed files with 16 additions and 0 deletions
+4
View File
@@ -148,6 +148,8 @@ mod modf;
mod modff;
mod pow;
mod powf;
mod remainder;
mod remainderf;
mod remquo;
mod remquof;
mod round;
@@ -258,6 +260,8 @@ pub use self::modf::modf;
pub use self::modff::modff;
pub use self::pow::pow;
pub use self::powf::powf;
pub use self::remainder::remainder;
pub use self::remainderf::remainderf;
pub use self::remquo::remquo;
pub use self::remquof::remquof;
pub use self::round::round;
+6
View File
@@ -0,0 +1,6 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn remainder(x: f64, y: f64) -> f64 {
let (result, _) = super::remquo(x, y);
result
}
+6
View File
@@ -0,0 +1,6 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn remainderf(x: f32, y: f32) -> f32 {
let (result, _) = super::remquof(x, y);
result
}