Name |
Last commit
|
Last update |
---|---|---|
.. | ||
float.h | ||
iso646.h | ||
stdalign.h | ||
stdarg.h | ||
stdatomic.h | ||
stdbool.h | ||
stddef.h | ||
stdfix.h | ||
stdint-gcc.h | ||
stdint-wrap.h | ||
stdnoreturn.h | ||
tgmath.h | ||
unwind-arm-common.h | ||
varargs.h |
TS 18661-1 defines a macro CR_DECIMAL_DIG in <float.h>, for the number of decimal digits for which conversions between decimal character strings and (IEEE) binary formats, in both directions, are correctly rounded. This patch implements support for this macro in GCC's <float.h>. The definition __UINTMAX_MAX__ is the right one for GCC's conversions of floating constants, since I made those use MPFR to make them correctly rounding. The macro also covers standard library functions such as strtod and printf. The definition is also correct for current glibc. If any targets' libcs support correct rounding in a way that conforms to TS 18661-1 with a smaller value of CR_DECIMAL_DIG, making <float.h> reflect that could not be done in isolation without changes to the interpretation of floating constants as well, since a smaller CR_DECIMAL_DIG requires double rounding of floating constants (first to CR_DECIMAL_DIG decimal digits, then to the desired binary format). Boostrapped with no regressions on x86_64-pc-linux-gnu. gcc: * ginclude/float.h [__STDC_WANT_IEC_60559_BFP_EXT__] (CR_DECIMAL_DIG): New macro. gcc/testsuite: * gcc.dg/cr-decimal-dig-1.c: New test. From-SVN: r240249
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
float.h | Loading commit data... | |
iso646.h | Loading commit data... | |
stdalign.h | Loading commit data... | |
stdarg.h | Loading commit data... | |
stdatomic.h | Loading commit data... | |
stdbool.h | Loading commit data... | |
stddef.h | Loading commit data... | |
stdfix.h | Loading commit data... | |
stdint-gcc.h | Loading commit data... | |
stdint-wrap.h | Loading commit data... | |
stdnoreturn.h | Loading commit data... | |
tgmath.h | Loading commit data... | |
unwind-arm-common.h | Loading commit data... | |
varargs.h | Loading commit data... |