implement acos, acosf, acosh, acoshf
This commit is contained in:
parent
c48c792f91
commit
1ea320e6f6
|
@ -5,3 +5,6 @@ edition = "2018"
|
|||
authors = [ "The LibM Team of HaruxOS" ]
|
||||
description = "A port of `libm` that has all the required no_mangle and extern-cs for linking."
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
libm = "0.2.1"
|
11
src/lib.rs
11
src/lib.rs
|
@ -5,7 +5,16 @@
|
|||
* The externc-libm library.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The Bootmgr Team of the HaruxOS Project
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#![no_std]
|
||||
|
||||
#[path = "math/acos.rs"]
|
||||
pub mod acos;
|
||||
#[path = "math/acosf.rs"]
|
||||
pub mod acosf;
|
||||
#[path = "math/acosh.rs"]
|
||||
pub mod acosh;
|
||||
#[path = "math/acoshf.rs"]
|
||||
pub mod acoshf;
|
14
src/math/acos.rs
Normal file
14
src/math/acos.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/acos.rs
|
||||
*
|
||||
* The acos function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn acos(x: f64) -> f64 {
|
||||
libm::acos(x)
|
||||
}
|
14
src/math/acosf.rs
Normal file
14
src/math/acosf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/acos.rs
|
||||
*
|
||||
* The acosf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn acosf(x: f32) -> f32 {
|
||||
libm::acosf(x)
|
||||
}
|
14
src/math/acosh.rs
Normal file
14
src/math/acosh.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/acos.rs
|
||||
*
|
||||
* The acosh function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn acosh(x: f64) -> f64 {
|
||||
libm::acosh(x)
|
||||
}
|
14
src/math/acoshf.rs
Normal file
14
src/math/acoshf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/acos.rs
|
||||
*
|
||||
* The acoshf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn acoshf(x: f32) -> f32 {
|
||||
libm::acoshf(x)
|
||||
}
|
Loading…
Reference in a new issue