Skip to content

Commit

Permalink
core library: Disable fpmath tests for i386 ...
Browse files Browse the repository at this point in the history
This patch disables the floating-point epsilon test for i386 since
x87 registers are too imprecise and can't produce the expected
results.
  • Loading branch information
liushuyu committed Jul 25, 2023
1 parent 31395ec commit 40a52cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down

0 comments on commit 40a52cf

Please sign in to comment.