intprops: new macro INT_PROMOTE
[gnulib.git] / doc / posix-headers / float.texi
blob14e321fec42619ca51b6c996f8b8cb303b043b76
1 @node float.h
2 @section @file{float.h}
4 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html}
6 Gnulib module: float-h
7 @mindex float-h
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 The conversion from @code{int} to @code{long double} in incorrect on some
13 platforms:
14 glibc 2.7 on Linux/SPARC64.
15 @item
16 The values of @code{LDBL_*} macros are incorrect on some platforms:
17 On OpenBSD 4.0 and MirBSD 10, they are the same as the values of the
18 @code{DBL_*} macros, although @samp{long double} is a larger type than
19 @samp{double}.
20 On FreeBSD/x86 6.4, they represent the incorrect 53-bit precision assumptions
21 in the compiler, not the real 64-bit precision at runtime.
22 On Linux/PowerPC with GCC 4.4, and on AIX 7.1 with GCC 4.2,
23 they don't reflect the ``double double'' representation of @code{long double}
24 correctly.
25 @item
26 The macros
27 @code{FLT_HAS_SUBNORM}, @code{FLT_DECIMAL_DIG}, @code{FLT_TRUE_MIN},
28 @code{DBL_HAS_SUBNORM}, @code{DBL_DECIMAL_DIG}, @code{DBL_TRUE_MIN},
29 @code{LDBL_HAS_SUBNORM}, @code{LDBL_DECIMAL_DIG}, @code{LDBL_TRUE_MIN},
30 that were added in ISO C 11, are missing on some platforms:
31 gcc 4.5.4, clang 7, Solaris 11.3 with Sun C.
32 @item
33 The macro @code{LDBL_DECIMAL_DIG} is missing on some platforms:
34 MSVC 14.
35 @item
36 The value of macro @code{FLT_TRUE_MIN} is not a @code{float} on some platforms:
37 AIX 7.1 with xlc.
38 @item
39 The macros
40 @code{FLT_IS_IEC_60559}, @code{FLT_NORM_MAX}, @code{FLT_SNAN},
41 @code{DBL_IS_IEC_60559}, @code{DBL_NORM_MAX}, @code{DBL_SNAN},
42 @code{LDBL_IS_IEC_60559}, @code{LDBL_NORM_MAX}, @code{LDBL_SNAN},
43 that were added in ISO C 23, are missing on some platforms:
44 gcc 14 without @code{-std=c23} or @code{-std=gnu23}, clang 18, musl libc 1.2.5, AIX 7.3 with xlclang, Solaris 11.3 with Sun C, MSVC 14.
45 @end itemize
47 Portability problems not fixed by Gnulib:
48 @itemize
49 @item
50 The macro @code{FLT_ROUNDS} is a constant expression and does not represent
51 the current rounding mode on some platforms:
52 glibc 2.11, HP-UX 11, mingw.
53 @item
54 The value of @code{FLT_TRUE_MIN} is not a constant on some platforms:
55 FreeBSD/x86.
56 @item
57 The values of @code{FLT_SNAN}, @code{DBL_SNAN}, @code{LDBL_SNAN} are not
58 constants on some platforms:
59 AIX 7.3 with xlclang, and all platforms which use the gnulib replacements.
60 @end itemize