Add remainder

This PR adds the missing `remainder` and `remainderf` found in musl libm respectly https://git.musl-libc.org/cgit/musl/tree/src/math/remainder.c and https://git.musl-libc.org/cgit/musl/tree/src/math/remainderf.c

Signed-off-by: Benjamin Schultzer <benjamin@schultzer.com>
This commit is contained in:
Benjamin Schultzer
2019-07-03 11:57:54 -07:00
parent b03bda35fe
commit a0dd0550ad
3 changed files with 14 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;
+5
View File
@@ -0,0 +1,5 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn remainder(x: f64, y: f64) -> (f64, i32) {
super::remquo(x, y)
}
+5
View File
@@ -0,0 +1,5 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn remainderf(x: f32, y: f32) -> (f32, i32) {
super::remquof(x, y)
}