Add bindings for ldexp/ldexpf

Should help in fixing wasmerio/wasmer#407
This commit is contained in:
Alex Crichton
2019-05-02 12:21:55 -07:00
parent 69ded67c91
commit 7e49f83241
3 changed files with 14 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn ldexp(x: f64, n: i32) -> f64 {
super::scalbn(x, n)
}
+5
View File
@@ -0,0 +1,5 @@
#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn ldexpf(x: f32, n: i32) -> f32 {
super::scalbnf(x, n)
}
+4
View File
@@ -104,6 +104,8 @@ mod fmod;
mod fmodf;
mod hypot;
mod hypotf;
mod ldexp;
mod ldexpf;
mod log;
mod log10;
mod log10f;
@@ -166,6 +168,8 @@ pub use self::fmod::fmod;
pub use self::fmodf::fmodf;
pub use self::hypot::hypot;
pub use self::hypotf::hypotf;
pub use self::ldexp::ldexp;
pub use self::ldexpf::ldexpf;
pub use self::log::log;
pub use self::log10::log10;
pub use self::log10f::log10f;