Merge pull request #518 from ankane/lgamma

This commit is contained in:
Amanieu d'Antras 2023-03-05 21:38:21 +01:00 committed by GitHub
commit 21a9afc342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,31 @@ no_mangle! {
fn tanf(n: f32) -> f32;
}
#[cfg(any(
all(
target_family = "wasm",
target_os = "unknown",
not(target_env = "wasi")
),
target_os = "xous",
all(target_arch = "x86_64", target_os = "uefi"),
all(target_arch = "xtensa", target_os = "none"),
all(target_vendor = "fortanix", target_env = "sgx")
))]
intrinsics! {
pub extern "C" fn lgamma_r(x: f64, s: &mut i32) -> f64 {
let r = self::libm::lgamma_r(x);
*s = r.1;
r.0
}
pub extern "C" fn lgammaf_r(x: f32, s: &mut i32) -> f32 {
let r = self::libm::lgammaf_r(x);
*s = r.1;
r.0
}
}
#[cfg(any(
target_os = "xous",
target_os = "uefi",