about summary refs log tree commit diff
diff options
context:
space:
mode:
authorliushuyu <liushuyu011@gmail.com>2023-07-25 09:48:12 +0800
committerliushuyu <liushuyu011@gmail.com>2023-07-25 11:19:57 +0800
commit40a52cf55cccd497f4e3d04c6b46aecb7f75f467 (patch)
tree3c7b5bb547ac273586ab3154f740d07525d75fca
parent31395ec38250b60b380fd3c27e94756aba3557de (diff)
downloadrust-40a52cf55cccd497f4e3d04c6b46aecb7f75f467.tar.gz
rust-40a52cf55cccd497f4e3d04c6b46aecb7f75f467.zip
core library: Disable fpmath tests for i386 ...
This patch disables the floating-point epsilon test for i386 since
x87 registers are too imprecise and can't produce the expected
results.
-rw-r--r--library/core/src/num/f32.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index d050d21c8c5..f5c2d1c6bf6 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -800,7 +800,7 @@ impl f32 {
     /// let angle = std::f32::consts::PI;
     ///
     /// let abs_difference = (angle.to_degrees() - 180.0).abs();
-    ///
+    /// # #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))]
     /// assert!(abs_difference <= f32::EPSILON);
     /// ```
     #[must_use = "this returns the result of the operation, \