summaryrefslogtreecommitdiffstats
path: root/vendor/libm-0.1.4/src/math/sinhf.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/libm-0.1.4/src/math/sinhf.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libm-0.1.4/src/math/sinhf.rs')
-rw-r--r--vendor/libm-0.1.4/src/math/sinhf.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/vendor/libm-0.1.4/src/math/sinhf.rs b/vendor/libm-0.1.4/src/math/sinhf.rs
deleted file mode 100644
index fd0b2bfc8..000000000
--- a/vendor/libm-0.1.4/src/math/sinhf.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use super::expm1f;
-use super::k_expo2f;
-
-#[inline]
-#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
-pub fn sinhf(x: f32) -> f32 {
- let mut h = 0.5f32;
- let mut ix = x.to_bits();
- if (ix >> 31) != 0 {
- h = -h;
- }
- /* |x| */
- ix &= 0x7fffffff;
- let absx = f32::from_bits(ix);
- let w = ix;
-
- /* |x| < log(FLT_MAX) */
- if w < 0x42b17217 {
- let t = expm1f(absx);
- if w < 0x3f800000 {
- if w < (0x3f800000 - (12 << 23)) {
- return x;
- }
- return h * (2. * t - t * t / (t + 1.));
- }
- return h * (t + t / (t + 1.));
- }
-
- /* |x| > logf(FLT_MAX) or nan */
- 2. * h * k_expo2f(absx)
-}