Wed May 8 22:59:07 2024 UTC (11d)
tests/lib/libm/t_fe_round: xfail for modfl uses.

PR lib/58237: modfl returns wrong answers on ld128 architectures


(riastradh)
diff -r1.17 -r1.18 src/tests/lib/libm/t_fe_round.c

cvs diff -r1.17 -r1.18 src/tests/lib/libm/t_fe_round.c (expand / switch to unified diff)

--- src/tests/lib/libm/t_fe_round.c 2024/05/05 23:08:53 1.17
+++ src/tests/lib/libm/t_fe_round.c 2024/05/08 22:59:07 1.18
@@ -381,26 +381,32 @@ ATF_TC_BODY(fe_nearbyintl_rintl, tc) @@ -381,26 +381,32 @@ ATF_TC_BODY(fe_nearbyintl_rintl, tc)
381 ATF_CHECK_MSG(fetestexcept(FE_INEXACT) != 0, 381 ATF_CHECK_MSG(fetestexcept(FE_INEXACT) != 0,
382 "[%u] %s %s(%Lf)" 382 "[%u] %s %s(%Lf)"
383 " failed to raise FE_INEXACT", 383 " failed to raise FE_INEXACT",
384 i, rmname(valuesl[i].round_mode), 384 i, rmname(valuesl[i].round_mode),
385 fnname[fn], valuesl[i].input); 385 fnname[fn], valuesl[i].input);
386 } else { 386 } else {
387 ATF_CHECK_MSG(fetestexcept(FE_INEXACT) == 0, 387 ATF_CHECK_MSG(fetestexcept(FE_INEXACT) == 0,
388 "[%u] %s %s(%Lf)" 388 "[%u] %s %s(%Lf)"
389 " spuriously raised FE_INEXACT", 389 " spuriously raised FE_INEXACT",
390 i, rmname(valuesl[i].round_mode), 390 i, rmname(valuesl[i].round_mode),
391 fnname[fn], valuesl[i].input); 391 fnname[fn], valuesl[i].input);
392 } 392 }
393 393
 394#if __HAVE_LONG_DOUBLE + 0 == 128
 395 atf_tc_expect_fail("PR lib/58237:"
 396 " modfl returns wrong answers"
 397 " on ld128 architectures");
 398#endif
 399
394 /* 400 /*
395 * Verify the fractional part of the result is 401 * Verify the fractional part of the result is
396 * zero -- the result of rounding to an integer 402 * zero -- the result of rounding to an integer
397 * is supposed to be an integer. 403 * is supposed to be an integer.
398 */ 404 */
399 fpart = modfl(received, &ipart); 405 fpart = modfl(received, &ipart);
400 ATF_CHECK_MSG(fpart == 0, 406 ATF_CHECK_MSG(fpart == 0,
401 "[%u] %s %s(%Lf)=%Lf has fractional part %Lf" 407 "[%u] %s %s(%Lf)=%Lf has fractional part %Lf"
402 " (integer part %Lf)", 408 " (integer part %Lf)",
403 i, rmname(valuesl[i].round_mode), fnname[fn], 409 i, rmname(valuesl[i].round_mode), fnname[fn],
404 valuesl[i].input, received, fpart, ipart); 410 valuesl[i].input, received, fpart, ipart);
405 411
406 /* 412 /*