about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-08-06 22:17:32 -0500
committerGitHub <noreply@github.com>2024-08-06 22:17:32 -0500
commitb3bfd666273dcfd2f3d036f6a27ff5affc96558b (patch)
treef8bc252e0e0caa801e4b524c03ab4957d93f90c8 /library/std/src/sys
parent10a7f93f12faab3b1bfa65688e3dcc6d1291fb0b (diff)
parent8e2ca0c9d500ea435fbf9858a4d8cec8ee7dfde3 (diff)
Rollup merge of #128417 - tgross35:f16-f128-math, r=dtolnay
Add `f16` and `f128` math functions

This adds intrinsics and math functions for `f16` and `f128` floating point types. Support is quite limited and some things are broken so tests don't run on many platforms, but this provides a starting point.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/cmath.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/library/std/src/sys/cmath.rs b/library/std/src/sys/cmath.rs
index 99df503b82d..2997e908fa1 100644
--- a/library/std/src/sys/cmath.rs
+++ b/library/std/src/sys/cmath.rs
@@ -28,6 +28,21 @@ extern "C" {
     pub fn lgamma_r(n: f64, s: &mut i32) -> f64;
     pub fn lgammaf_r(n: f32, s: &mut i32) -> f32;
 
+    pub fn acosf128(n: f128) -> f128;
+    pub fn asinf128(n: f128) -> f128;
+    pub fn atanf128(n: f128) -> f128;
+    pub fn atan2f128(a: f128, b: f128) -> f128;
+    pub fn cbrtf128(n: f128) -> f128;
+    pub fn coshf128(n: f128) -> f128;
+    pub fn expm1f128(n: f128) -> f128;
+    pub fn hypotf128(x: f128, y: f128) -> f128;
+    pub fn log1pf128(n: f128) -> f128;
+    pub fn sinhf128(n: f128) -> f128;
+    pub fn tanf128(n: f128) -> f128;
+    pub fn tanhf128(n: f128) -> f128;
+    pub fn tgammaf128(n: f128) -> f128;
+    pub fn lgammaf128_r(n: f128, s: &mut i32) -> f128;
+
     cfg_if::cfg_if! {
     if #[cfg(not(all(target_os = "windows", target_env = "msvc", target_arch = "x86")))] {
         pub fn acosf(n: f32) -> f32;