add expm1, expm1f functions

This commit is contained in:
HTG-YT 2021-08-07 14:07:20 +08:00
parent 61dee6c58b
commit 4421b24126
3 changed files with 33 additions and 1 deletions

View file

@ -78,3 +78,7 @@ pub mod exp10;
pub mod exp10f; pub mod exp10f;
#[path = "math/expf.rs"] #[path = "math/expf.rs"]
pub mod expf; pub mod expf;
#[path = "math/expm1.rs"]
pub mod expm1;
#[path = "math/expm1f.rs"]
pub mod expm1f;

14
src/math/expm1.rs Normal file
View file

@ -0,0 +1,14 @@
// SPDX-License-Identifier: MPL-2.0
/*
* File: src/math/expm1.rs
*
* The expm1 function.
*
* Author: HTG-YT
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
*/
#[no_mangle]
pub extern "C" fn expm1(x: f64) -> f64 {
libm::expm1(x)
}

14
src/math/expm1f.rs Normal file
View file

@ -0,0 +1,14 @@
// SPDX-License-Identifier: MPL-2.0
/*
* File: src/math/expm1f.rs
*
* The expm1f function.
*
* Author: HTG-YT
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
*/
#[no_mangle]
pub extern "C" fn expm1f(x: f32) -> f32 {
libm::expm1f(x)
}