blob: dad2613499ca9c8ef8e30f46b50543a343697991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From: liushuyu <liushuyu011@gmail.com>
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.
Forwarded: https://github.com/rust-lang/rust/pull/114042
---
library/core/src/num/f32.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: rust/library/core/src/num/f32.rs
===================================================================
--- rust.orig/library/core/src/num/f32.rs
+++ rust/library/core/src/num/f32.rs
@@ -799,7 +799,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, \
|