Module Name: src Committed By: riastradh Date: Thu May 2 11:55:49 UTC 2024
Modified Files: src/tests/lib/libm: t_fe_round.c Log Message: tests/lib/libm/t_fe_round.c: Simplify previous. There is never any need to write casts to type T in integer constant initializers for type T. PR lib/58054 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libm/t_fe_round.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libm/t_fe_round.c diff -u src/tests/lib/libm/t_fe_round.c:1.12 src/tests/lib/libm/t_fe_round.c:1.13 --- src/tests/lib/libm/t_fe_round.c:1.12 Thu May 2 03:30:07 2024 +++ src/tests/lib/libm/t_fe_round.c Thu May 2 11:55:49 2024 @@ -146,28 +146,24 @@ ATF_TC_BODY(fe_nearbyint, tc) #ifdef __HAVE_LONG_DOUBLE -#define IM intmax_t - /* * Use one bit more than fits in IEEE 754 binary64. */ static const struct { int round_mode; long double input; - IM expected; + intmax_t expected; } valuesl[] = { - { FE_TOWARDZERO, 0x2.00000000000008p+52L, (IM)0x20000000000000 }, - { FE_DOWNWARD, 0x2.00000000000008p+52L, (IM)0x20000000000000 }, - { FE_UPWARD, 0x2.00000000000008p+52L, (IM)0x20000000000001 }, - { FE_TONEAREST, 0x2.00000000000008p+52L, (IM)0x20000000000000 }, - { FE_TOWARDZERO, 0x2.00000000000018p+52L, (IM)0x20000000000001 }, - { FE_DOWNWARD, 0x2.00000000000018p+52L, (IM)0x20000000000001 }, - { FE_UPWARD, 0x2.00000000000018p+52L, (IM)0x20000000000002 }, - { FE_TONEAREST, 0x2.00000000000018p+52L, (IM)0x20000000000002 }, + { FE_TOWARDZERO, 0x2.00000000000008p+52L, 0x20000000000000 }, + { FE_DOWNWARD, 0x2.00000000000008p+52L, 0x20000000000000 }, + { FE_UPWARD, 0x2.00000000000008p+52L, 0x20000000000001 }, + { FE_TONEAREST, 0x2.00000000000008p+52L, 0x20000000000000 }, + { FE_TOWARDZERO, 0x2.00000000000018p+52L, 0x20000000000001 }, + { FE_DOWNWARD, 0x2.00000000000018p+52L, 0x20000000000001 }, + { FE_UPWARD, 0x2.00000000000018p+52L, 0x20000000000002 }, + { FE_TONEAREST, 0x2.00000000000018p+52L, 0x20000000000002 }, }; -#undef IM - ATF_TC(fe_nearbyintl); ATF_TC_HEAD(fe_nearbyintl, tc) {