add fabs, fabsf, fdim, fdimf functions
This commit is contained in:
parent
4421b24126
commit
276f755737
10
src/lib.rs
10
src/lib.rs
|
@ -81,4 +81,12 @@ pub mod expf;
|
|||
#[path = "math/expm1.rs"]
|
||||
pub mod expm1;
|
||||
#[path = "math/expm1f.rs"]
|
||||
pub mod expm1f;
|
||||
pub mod expm1f;
|
||||
#[path = "math/fabs.rs"]
|
||||
pub mod fabs;
|
||||
#[path = "math/fabsf.rs"]
|
||||
pub mod fabsf;
|
||||
#[path = "math/fdim.rs"]
|
||||
pub mod fdim;
|
||||
#[path = "math/fdimf.rs"]
|
||||
pub mod fdimf;
|
14
src/math/fabs.rs
Normal file
14
src/math/fabs.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fabs.rs
|
||||
*
|
||||
* The fabs function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fabs(x: f64) -> f64 {
|
||||
libm::fabs(x)
|
||||
}
|
14
src/math/fabsf.rs
Normal file
14
src/math/fabsf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fabsf.rs
|
||||
*
|
||||
* The fabsf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fabsf(x: f32) -> f32 {
|
||||
libm::fabsf(x)
|
||||
}
|
14
src/math/fdim.rs
Normal file
14
src/math/fdim.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fdim.rs
|
||||
*
|
||||
* The fdim function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fdim(x: f64, y: f64) -> f64 {
|
||||
libm::fdim(x, y)
|
||||
}
|
14
src/math/fdimf.rs
Normal file
14
src/math/fdimf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fdimf.rs
|
||||
*
|
||||
* The fdimf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fdimf(x: f32, y: f32) -> f32 {
|
||||
libm::fdimf(x, y)
|
||||
}
|
Loading…
Reference in a new issue