add exp, exp10, exp10f, exp2, exp2f, expf functions

pull/1/head
HTG-YT 2021-08-07 13:38:12 +08:00
parent 4ddc856fa6
commit cc9e2b19de
7 changed files with 97 additions and 1 deletions

View File

@ -65,4 +65,16 @@ pub mod erfc;
#[path = "math/erfcf.rs"]
pub mod erfcf;
#[path = "math/erff.rs"]
pub mod erff;
pub mod erff;
#[path = "math/exp.rs"]
pub mod exp;
#[path = "math/exp2.rs"]
pub mod exp2;
#[path = "math/exp2f.rs"]
pub mod exp2f;
#[path = "math/exp10.rs"]
pub mod exp10;
#[path = "math/exp10f.rs"]
pub mod exp10f;
#[path = "math/expf.rs"]
pub mod expf;

14
src/math/exp.rs Normal file
View File

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

14
src/math/exp10.rs Normal file
View File

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

14
src/math/exp10f.rs Normal file
View File

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

14
src/math/exp2.rs Normal file
View File

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

14
src/math/exp2f.rs Normal file
View File

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

14
src/math/expf.rs Normal file
View File

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