core library: Disable fpmath tests for i386 ... · rust-lang/rust@40a52cf (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 40a52cf
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.
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -800,7 +800,7 @@ impl f32 { | ||
800 | 800 | /// let angle = std::f32::consts::PI; |
801 | 801 | /// |
802 | 802 | /// let abs_difference = (angle.to_degrees() - 180.0).abs(); |
803 | - /// | |
803 | + /// # #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))] | |
804 | 804 | /// assert!(abs_difference <= f32::EPSILON); |
805 | 805 | /// ``` |
806 | 806 | #[must_use = "this returns the result of the operation, \ |