summaryrefslogtreecommitdiffstats
path: root/vendor/libm/src/math/sin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libm/src/math/sin.rs')
-rw-r--r--vendor/libm/src/math/sin.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/libm/src/math/sin.rs b/vendor/libm/src/math/sin.rs
index 51aed88a8..a53843dcd 100644
--- a/vendor/libm/src/math/sin.rs
+++ b/vendor/libm/src/math/sin.rs
@@ -40,7 +40,6 @@ use super::{k_cos, k_sin, rem_pio2};
//
// Accuracy:
// TRIG(x) returns trig(x) nearly rounded
-#[inline]
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn sin(x: f64) -> f64 {
let x1p120 = f64::from_bits(0x4770000000000000); // 0x1p120f === 2 ^ 120
@@ -82,5 +81,8 @@ pub fn sin(x: f64) -> f64 {
fn test_near_pi() {
let x = f64::from_bits(0x400921fb000FD5DD); // 3.141592026217707
let sx = f64::from_bits(0x3ea50d15ced1a4a2); // 6.273720864039205e-7
- assert_eq!(sin(x), sx);
+ let result = sin(x);
+ #[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
+ let result = force_eval!(result);
+ assert_eq!(result, sx);
}