doc/posix-headers/float.texi

Branch


Log

Author Commit Date CI Message
Paul Eggert 1ce8849f 2025-07-28T17:50:30 float-h: change IBM long double to match GCC 15 This is in response to the GCC developers; see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120993>. * lib/float.c (gl_LDBL_MAX): Remove the implementation for PowerPC, as it should no longer be needed. * lib/float.in.h (LDBL_MIN_EXP, LDBL_MIN_10_EXP, LDBL_MIN) (LDBL_MAX, LDBL_EPSILON, LDBL_NORM_MAX): On PowerPC with IBM long double, simplify by using the GCC 15 values unconditionally. These are the correct values according to the GCC developers and there seems little point to disagreeing with current GCC about obsolescent arithmetic that is so problematic in practice. * tests/test-float-h.c (test_long_double): Relax tests of LDBL_MAX when !LDBL_IS_IEC_60559, as the tests would now fail on PowerPC and they were not portable in that case anyway.
Paul Eggert 6164b4cb 2025-07-08T17:34:25 float-h: work around GCC bug 120993 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.
Bruno Haible 3d1b90b4 2024-12-27T23:14:08 Rename module float to float-h. * modules/float-h: Renamed from modules/float. * modules/float-h-tests: Renamed from modules/float-tests. * modules/float-h-c++-tests: Renamed from modules/float-c++-tests. * tests/test-float-h.c: Renamed from tests/test-float.c. * tests/test-float-h-c++.cc: Renamed from tests/test-float-c++.cc. * tests/test-float-h-c++2.cc: Renamed from tests/test-float-c++2.cc. * doc/posix-headers/float.texi: Update. * modules/* (Depends-on): Update. * modules/float: New file.
Bruno Haible c36a0f21 2024-10-27T17:01:29 doc: Add a module index. * doc/Makefile (undocumented-modules.texi): New rule. (%.info, %.html, %.dvi, %.pdf): Depend on undocumented-modules.texi. (mostlyclean): Remove also *.m and *.tmp. (force): New rule. * doc/*.texi: Add module index entries. * doc/*/*.texi: Likewise.
Bruno Haible fda40b61 2024-08-01T00:46:49 float: Update to mostly guarantee ISO C 23 compliance. * doc/posix-headers/float.texi: Mention the various portability problems. * lib/float.in.h (FLT_HAS_SUBNORM, FLT_DECIMAL_DIG, FLT_TRUE_MIN, DBL_HAS_SUBNORM, DBL_DECIMAL_DIG, DBL_TRUE_MIN, LDBL_HAS_SUBNORM, LDBL_DECIMAL_DIG, LDBL_TRUE_MIN): New macros. (gl_LDBL_TRUE_MIN): New declaration. (FLT_IS_IEC_60559, FLT_NORM_MAX, FLT_SNAN, GNULIB_defined_FLT_SNAN, DBL_IS_IEC_60559, DBL_NORM_MAX, DBL_SNAN, GNULIB_defined_DBL_SNAN, LDBL_IS_IEC_60559, LDBL_NORM_MAX, LDBL_SNAN, GNULIB_defined_LDBL_SNAN): New macros. (gl_FLT_SNAN_t, gl_DBL_SNAN_t, gl_LDBL_SNAN_t): New types. (gl_FLT_SNAN, gl_DBL_SNAN, gl_LDBL_SNAN): New declarations. * lib/float.c (gl_LDBL_TRUE_MIN): New variable. (gl_FLT_SNAN, gl_DBL_SNAN, gl_LDBL_SNAN): New variables. * m4/float_h.m4 (gl_FLOAT_H): Add check whether float.h conforms to ISO C23. Set REPLACE_FLOAT_SNAN. * modules/float (configure.ac): Test also REPLACE_FLOAT_SNAN. Require gl_BIGENDIAN. * tests/test-float.c: Also check FLT_EVAL_METHOD, FLT_HAS_SUBNORM, FLT_DECIMAL_DIG, FLT_IS_IEC_60559, FLT_TRUE_MIN, FLT_NORM_MAX, DBL_HAS_SUBNORM, DBL_DECIMAL_DIG, DBL_IS_IEC_60559, DBL_TRUE_MIN, DBL_NORM_MAX, LDBL_HAS_SUBNORM, LDBL_DECIMAL_DIG, LDBL_IS_IEC_60559. Conditionally check LDBL_TRUE_MIN, LDBL_NORM_MAX. Include isnanf-nolibm.h, isnand-nolibm.h, isnanl-nolibm.h. (test_float): Check the values of FLT_HAS_SUBNORM, FLT_DECIMAL_DIG, FLT_TRUE_MIN, FLT_IS_IEC_60559, FLT_NORM_MAX, FLT_SNAN. (test_double): Check the values of DBL_HAS_SUBNORM, DBL_DECIMAL_DIG, DBL_TRUE_MIN, DBL_IS_IEC_60559, DBL_NORM_MAX, DBL_SNAN. (test_long_double): Check the values of LDBL_HAS_SUBNORM, LDBL_DECIMAL_DIG, LDBL_TRUE_MIN, LDBL_IS_IEC_60559, LDBL_NORM_MAX, LDBL_SNAN. * modules/float-tests (Depends-on): Add isnanf-nolibm, isnand-nolibm, isnanl-nolibm.
Bruno Haible 34b38352 2024-07-20T13:50:52 doc: Reference POSIX:2024 instead of POSIX:2018. * doc/*.texi: Change URL to POSIX. * doc/posix-headers/*.texi: Likewise. * doc/posix-functions/*.texi: Likewise.
Bruno Haible 7941742a 2024-04-25T22:07:37 doc: Remove documentation of IRIX as supported platform. * doc/posix-headers/netdb.texi: Don't mention IRIX specific workarounds. * doc/posix-headers/pthread.texi: Likewise. * doc/posix-headers/sys_socket.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/posix-functions/btowc.texi: Likewise. * doc/posix-functions/cbrtf.texi: Likewise. * doc/posix-functions/cbrtl.texi: Likewise. * doc/posix-functions/copysignf.texi: Likewise. * doc/posix-functions/exp2.texi: Likewise. * doc/posix-functions/exp2f.texi: Likewise. * doc/posix-functions/exp2l.texi: Likewise. * doc/posix-functions/expm1f.texi: Likewise. * doc/posix-functions/expm1l.texi: Likewise. * doc/posix-functions/fabsl.texi: Likewise. * doc/posix-functions/isnan.texi: Likewise. * doc/posix-functions/iswblank.texi: Likewise. * doc/posix-functions/link.texi: Likewise. * doc/posix-functions/log10l.texi: Likewise. * doc/posix-functions/log1pf.texi: Likewise. * doc/posix-functions/log2.texi: Likewise. * doc/posix-functions/log2f.texi: Likewise. * doc/posix-functions/log2l.texi: Likewise. * doc/posix-functions/lseek.texi: Likewise. * doc/posix-functions/nl_langinfo.texi: Likewise. * doc/posix-functions/pthread_sigmask.texi: Likewise. * doc/posix-functions/remainderf.texi: Likewise. * doc/posix-functions/remainderl.texi: Likewise. * doc/posix-functions/rintf.texi: Likewise. * doc/posix-functions/sigaltstack.texi: Likewise. * doc/posix-functions/strtod.texi: Likewise. * doc/posix-functions/strtold.texi: Likewise. * doc/posix-functions/vscanf.texi: Likewise. * doc/posix-functions/wctob.texi: Likewise. * doc/**/*.texi: Update.
Paul Eggert 9e78024b 2019-09-22T23:23:20 Update some URLs This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
Bruno Haible a4b2403a 2019-07-06T04:35:31 doc: Remove documentation of BeOS as a supported platform. * doc/gnulib-intro.texi (Target Platforms): Mention that BeOS is unsupported. * doc/*-functions/*printf.texi: Don't mention BeOS specific workarounds. * doc/posix-functions/getdelim.texi: Likewise. * doc/**/*.texi: Update.
Bruno Haible 8c66a845 2011-11-07T00:22:31 Doc about floating-point and math API. * doc/posix-headers/float.texi: Mention problem with FLT_ROUNDS. * doc/posix-headers/math.texi: Mention problem with math_errhandling.
Bruno Haible fddec5c1 2011-09-30T21:07:43 float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64. * m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to 'long double'. Set REPLACE_ITOLD. * lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations. * lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations. * lib/itold.c: New file. * modules/float (Files): Add lib/itold.c. (configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c. (Makefile.am): Substitute REPLACE_ITOLD. * modules/math (Depends-on): Add float. (Makefile.am): Substitute REPLACE_ITOLD. * doc/posix-headers/float.texi: Mention problem on Linux/SPARC64. * doc/posix-headers/math.texi: Likewise. * doc/posix-functions/logl.texi: Likewise.
Bruno Haible c65d65a8 2011-09-30T03:56:26 float: Fix LDBL_MAX value on Linux/PowerPC. * m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also on Linux/PowerPC. * lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC. * lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC. * doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected platform. Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.
Bruno Haible 6187bd67 2011-06-20T12:38:05 float: Work around <float.h> bugs on FreeBSD/x86, AIX with GCC, IRIX. * lib/float.in.h: Add workarounds for FreeBSD/x86, AIX with GCC, IRIX. * lib/float.c: New file. * m4/float_h.m4 (gl_FLOAT_H): Also handle FreeBSD, AIX, IRIX. Set REPLACE_FLOAT_LDBL. * modules/float (Files): Add lib/float.c. (configure.ac): Invoke AC_LIBOBJ. * doc/posix-headers/float.texi: Mention problems on FreeBSD, AIX, IRIX.
Bruno Haible b14c9a8f 2010-10-02T18:35:08 Update doc for POSIX:2008. * doc/posix-headers/*.texi [except ucontext.texi, sys_timeb.texi]: Update URL of POSIX specification.
Eric Blake 2ce5b03d 2010-09-13T14:33:22 float: fix broken MirBSD header * m4/float_h.m4 (gl_FLOAT_H): MirBSD copied OpenBSD's bug. * doc/posix-headers/float.texi (float.h): Document it. Signed-off-by: Eric Blake <eblake@redhat.com>
Karl Berry 80fc442c 2010-08-13T11:50:58 avoid some overlong lines from posix urls, etc.
Bruno Haible 2b6c08c7 2008-01-20T00:09:59 Rename two directories: headers -> posix-headers, functions -> posix-functions.