add floor, floorf, fma, fmaf functions
This commit is contained in:
parent
276f755737
commit
8ba12611f3
|
@ -90,3 +90,11 @@ pub mod fabsf;
|
|||
pub mod fdim;
|
||||
#[path = "math/fdimf.rs"]
|
||||
pub mod fdimf;
|
||||
#[path = "math/floor.rs"]
|
||||
pub mod floor;
|
||||
#[path = "math/floorf.rs"]
|
||||
pub mod floorf;
|
||||
#[path = "math/fma.rs"]
|
||||
pub mod fma;
|
||||
#[path = "math/fmaf.rs"]
|
||||
pub mod fmaf;
|
14
src/math/floor.rs
Normal file
14
src/math/floor.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/floor.rs
|
||||
*
|
||||
* The floor function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn floor(x: f64) -> f64 {
|
||||
libm::floor(x)
|
||||
}
|
14
src/math/floorf.rs
Normal file
14
src/math/floorf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/floorf.rs
|
||||
*
|
||||
* The floorf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn floor(x: f32) -> f32 {
|
||||
libm::floorf(x)
|
||||
}
|
14
src/math/fma.rs
Normal file
14
src/math/fma.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fma.rs
|
||||
*
|
||||
* The fma function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fma(x: f64, y: f64, z: f64) -> f64 {
|
||||
libm::fma(x, y, z)
|
||||
}
|
14
src/math/fmaf.rs
Normal file
14
src/math/fmaf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/fmaf.rs
|
||||
*
|
||||
* The fmaf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fmaf(x: f32, y: f32, z: f32) -> f32 {
|
||||
libm::fmaf(x, y, z)
|
||||
}
|
Loading…
Reference in a new issue