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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user