mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
Also, fix a too-low LDBL_MAX on this platform, a problem that contributed to LDBL_NORM_MAX test failures with C23 PowerPC GCC with ibmlongdouble. * lib/float.c (gl_LDBL_MAX): On PowerPC with ibmlongdouble, the correct value is 2**1024 - 2**918, not 2**1024 - 2**971. Also, use C99 hex double notation for the divisor, as it’s clearer and should work nowadays. * lib/float.in.h: Simplify by not worring whether it’s AIX or GNU/Linux when redefining LDBL_* macros on PowerPC GCC with ibmlongdouble, as the problem seems to be universal then. (LDBL_NORM_MAX): On PowerPC GCC with ibmlongdouble, define to be LDBL_MAX, so that it’s 2**1024 - 2**918, doubling GCC’s value if supplied. * modules/float-h-tests (Depends-on): Remove floorl, ldexpl. Add truncl. (test_float_h_LDADD): Likewise for libraries. * tests/test-float-h.c (test_isfinitel): New static function, so that we need not rely on isfinitel. (normalize_long_double): Work even if X is negative or not finite. Do not rely on frexpl or ldexpl. Use truncl instead of floorl so that the negative results are consistent with positive. Defend against fritzy PowerPC long double arithmetic.
21 lines
283 B
Plaintext
21 lines
283 B
Plaintext
Files:
|
|
tests/test-float-h.c
|
|
tests/macros.h
|
|
|
|
Depends-on:
|
|
fpieee
|
|
fpucw
|
|
frexpl
|
|
isnanf-nolibm
|
|
isnand-nolibm
|
|
isnanl-nolibm
|
|
truncl
|
|
float-h-c++-tests
|
|
|
|
configure.ac:
|
|
|
|
Makefile.am:
|
|
TESTS += test-float-h
|
|
check_PROGRAMS += test-float-h
|
|
test_float_h_LDADD = $(LDADD) @FREXPL_LIBM@ @TRUNCL_LIBM@
|