Skip to content

Commit 725484e

Browse files
committed
fmaf: Add a test case from a MinGW failure
This is a known problem in the MinGW fmaf implementation, identified at [1]. Make sure our implementation passes this edge case. [1]: rust-lang/rust#140515
1 parent 7ccb126 commit 725484e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

libm-test/src/generate/case_list.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,18 @@ fn fma_cases() -> Vec<TestCase<op::fma::Routine>> {
269269
}
270270

271271
fn fmaf_cases() -> Vec<TestCase<op::fmaf::Routine>> {
272-
vec![]
272+
let mut v = vec![];
273+
TestCase::append_pairs(
274+
&mut v,
275+
&[
276+
// Known rounding error for some implementations (notably MinGW)
277+
(
278+
(-1.9369631e13f32, 2.1513551e-7, -1.7354427e-24),
279+
Some(-4167095.8),
280+
),
281+
],
282+
);
283+
v
273284
}
274285

275286
#[cfg(f128_enabled)]

0 commit comments

Comments
 (0)