add cbrt, cbrtf, ceil, ceilf

pull/1/head
HTG-YT 2021-08-07 12:22:39 +08:00
parent 8fc81cf4cd
commit 520b00ee89
5 changed files with 65 additions and 1 deletions

View File

@ -37,4 +37,12 @@ pub mod atanf;
#[path = "math/atanh.rs"]
pub mod atanh;
#[path = "math/atanhf.rs"]
pub mod atanhf;
pub mod atanhf;
#[path = "math/cbrt.rs"]
pub mod cbrt;
#[path = "math/cbrtf.rs"]
pub mod cbrtf;
#[path = "math/ceil.rs"]
pub mod ceil;
#[path = "math/ceilf.rs"]
pub mod ceilf;

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

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

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

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

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

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

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

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