From: liushuyu Date: Tue, 25 Jul 2023 01:48:12 +0000 (+0800) Subject: [PATCH] core library: Disable fpmath tests for i386 ... X-Git-Tag: archive/raspbian/1.74.1+dfsg1-1+rpi1^2~36 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2712249778a6bb728cfc97b9fafc644be57a4735;p=rustc.git [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. Forwarded: https://github.com/rust-lang/rust/pull/114042 Gbp-Pq: Name u-disable-fp-precision-test-on-i386.patch --- diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 290f649f9a..8209ed3e2f 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -820,7 +820,7 @@ impl f32 { /// let angle = std::f32::consts::PI; /// /// let abs_difference = (angle.to_degrees() - 180.0).abs(); - /// + /// # #[cfg(not(target_arch = "x86"))] /// assert!(abs_difference <= f32::EPSILON); /// ``` #[must_use = "this returns the result of the operation, \