From 40a52cf55cccd497f4e3d04c6b46aecb7f75f467 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Tue, 25 Jul 2023 09:48:12 +0800 Subject: [PATCH] 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. --- library/core/src/num/f32.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index d050d21c8c575..f5c2d1c6bf682 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, \