add expm1, expm1f functions

pull/1/head
HTG-YT 2021-08-07 14:07:20 +08:00
parent cc9e2b19de
commit 2270d7ed2d
3 changed files with 33 additions and 1 deletions

View File

@ -77,4 +77,8 @@ pub mod exp10;
#[path = "math/exp10f.rs"]
pub mod exp10f;
#[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)
}