From ee94a462f8ab1c2f0f9456ff112daae84f18056f Mon Sep 17 00:00:00 2001 From: HTG-YT Date: Sat, 7 Aug 2021 16:13:42 +0800 Subject: [PATCH] add j0, j0f, j1, j1f, jn, jnf functions --- src/lib.rs | 14 +++++++++++++- src/math/j0.rs | 14 ++++++++++++++ src/math/j0f.rs | 14 ++++++++++++++ src/math/j1.rs | 14 ++++++++++++++ src/math/j1f.rs | 14 ++++++++++++++ src/math/jn.rs | 14 ++++++++++++++ src/math/jnf.rs | 14 ++++++++++++++ 7 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/math/j0.rs create mode 100644 src/math/j0f.rs create mode 100644 src/math/j1.rs create mode 100644 src/math/j1f.rs create mode 100644 src/math/jn.rs create mode 100644 src/math/jnf.rs diff --git a/src/lib.rs b/src/lib.rs index 8ab3682..4f0625f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,4 +121,16 @@ pub mod hypotf; #[path = "math/ilogb.rs"] pub mod ilogb; #[path = "math/ilogbf.rs"] -pub mod ilogbf; \ No newline at end of file +pub mod ilogbf; +#[path = "math/j0.rs"] +pub mod j0; +#[path = "math/j0f.rs"] +pub mod j0f; +#[path = "math/j1.rs"] +pub mod j1; +#[path = "math/j1f.rs"] +pub mod j1f; +#[path = "math/jn.rs"] +pub mod jn; +#[path = "math/jnf.rs"] +pub mod jnf; \ No newline at end of file diff --git a/src/math/j0.rs b/src/math/j0.rs new file mode 100644 index 0000000..32e5b77 --- /dev/null +++ b/src/math/j0.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/j0.rs + * + * The j0 function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn j0(x: f64) -> f64 { + libm::j0(x) +} \ No newline at end of file diff --git a/src/math/j0f.rs b/src/math/j0f.rs new file mode 100644 index 0000000..e3c7516 --- /dev/null +++ b/src/math/j0f.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/j0f.rs + * + * The j0f function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn j0f(x: f32) -> f32 { + libm::j0f(x) +} \ No newline at end of file diff --git a/src/math/j1.rs b/src/math/j1.rs new file mode 100644 index 0000000..6936de8 --- /dev/null +++ b/src/math/j1.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/j1.rs + * + * The j1 function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn j1(x: f64) -> f64 { + libm::j1(x) +} \ No newline at end of file diff --git a/src/math/j1f.rs b/src/math/j1f.rs new file mode 100644 index 0000000..b865e78 --- /dev/null +++ b/src/math/j1f.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/j1f.rs + * + * The j1f function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn j1f(x: f32) -> f32 { + libm::j1f(x) +} \ No newline at end of file diff --git a/src/math/jn.rs b/src/math/jn.rs new file mode 100644 index 0000000..749ac44 --- /dev/null +++ b/src/math/jn.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/jn.rs + * + * The jn function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn jn(n: i32, x: f64) -> f64 { + libm::jn(n, x) +} \ No newline at end of file diff --git a/src/math/jnf.rs b/src/math/jnf.rs new file mode 100644 index 0000000..f758186 --- /dev/null +++ b/src/math/jnf.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/jnf.rs + * + * The jnf function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn jn(n: i32, x: f32) -> f32 { + libm::jnf(n, x) +} \ No newline at end of file