add modf, modff, nextafter, nextafterf functions
This commit is contained in:
parent
22890781eb
commit
8f5262c715
|
@ -162,3 +162,11 @@ pub mod log10;
|
|||
pub mod log10f;
|
||||
#[path = "math/logf.rs"]
|
||||
pub mod logf;
|
||||
#[path = "math/modf.rs"]
|
||||
pub mod modf;
|
||||
#[path = "math/modff.rs"]
|
||||
pub mod modff;
|
||||
#[path = "math/nextafter.rs"]
|
||||
pub mod nextafter;
|
||||
#[path = "math/nextafterf.rs"]
|
||||
pub mod nextafterf;
|
14
src/math/modf.rs
Normal file
14
src/math/modf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/modf.rs
|
||||
*
|
||||
* The modf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn modf(x: f64) -> (f64, f64) {
|
||||
libm::modf(x)
|
||||
}
|
14
src/math/modff.rs
Normal file
14
src/math/modff.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/modff.rs
|
||||
*
|
||||
* The modff function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn modff(x: f32) -> (f32, f32) {
|
||||
libm::modff(x)
|
||||
}
|
14
src/math/nextafter.rs
Normal file
14
src/math/nextafter.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/nextafter.rs
|
||||
*
|
||||
* The nextafter function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn nextafter(x: f64, y: f64) -> f64 {
|
||||
libm::nextafter(x, y)
|
||||
}
|
14
src/math/nextafterf.rs
Normal file
14
src/math/nextafterf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/nextafterf.rs
|
||||
*
|
||||
* The nextafterf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn nextafterf(x: f32, y: f32) -> f32 {
|
||||
libm::nextafterf(x, y)
|
||||
}
|
Loading…
Reference in a new issue