add cbrt, cbrtf, ceil, ceilf

This commit is contained in:
HTG-YT 2021-08-07 12:22:39 +08:00
parent 52b3dec336
commit e846d98bad
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)
}