Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 24a0c40

Browse files
committed
Add an override for failing ceil/floor tests on i586
1 parent 40b6a82 commit 24a0c40

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/libm-test/src/precision.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,16 @@ impl MaybeOverride<(f64,)> for SpecialCase {
267267
return XFAIL;
268268
}
269269

270+
if (ctx.fn_ident == Identifier::Ceil || ctx.fn_ident == Identifer::Floor)
271+
&& expected.0.eq_repr(F::NEG_ZERO)
272+
&& actual.0.eq_repr(F::ZERO)
273+
&& cfg!(x86_no_sse)
274+
{
275+
// FIXME: the x87 implementations lose the difference between -0.0 and 0.0.
276+
// See https://github.com/rust-lang/libm/pull/404#issuecomment-2572399955
277+
return XFAIL;
278+
}
279+
270280
maybe_check_nan_bits(actual, expected, ctx)
271281
}
272282

0 commit comments

Comments
 (0)