Add HUGE_VAL macros for more _FloatN, _FloatNx types.

This patch continues the preparation for additional _FloatN / _FloatNx
type support by adding appropriately conditional definitions of
HUGE_VAL_* macros, corresponding to the HUGE_VAL_F128 definition
already present.

Tested for x86_64.

	* math/math.h [__HAVE_FLOAT16 && __GLIBC_USE
	(IEC_60559_TYPES_EXT)] (HUGE_VAL_F16): New macro.
	[__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F32): Likewise.
	[__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F64): Likewise.
	[__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F32X): Likewise.
	[__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F64X): Likewise.
	[__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
	(HUGE_VAL_F128X): Likewise.
This commit is contained in:
Joseph Myers 2017-10-26 23:11:18 +00:00
parent 67ad7163bb
commit 5d220788b3
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,18 @@
2017-10-26 Joseph Myers <joseph@codesourcery.com>
* math/math.h [__HAVE_FLOAT16 && __GLIBC_USE
(IEC_60559_TYPES_EXT)] (HUGE_VAL_F16): New macro.
[__HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(HUGE_VAL_F32): Likewise.
[__HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(HUGE_VAL_F64): Likewise.
[__HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(HUGE_VAL_F32X): Likewise.
[__HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(HUGE_VAL_F64X): Likewise.
[__HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(HUGE_VAL_F128X): Likewise.
2017-10-26 Thierry Vignaud <thierry.vignaud@gmail.com>
* localedata/locales/br_FR (LC_IDENTIFICATON): Add

View File

@ -63,9 +63,27 @@ __BEGIN_DECLS
# define HUGE_VALL 1e10000L
# endif
#endif
#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F16 (__builtin_huge_valf16 ())
#endif
#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F32 (__builtin_huge_valf32 ())
#endif
#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F64 (__builtin_huge_valf64 ())
#endif
#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F128 (__builtin_huge_valf128 ())
#endif
#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F32X (__builtin_huge_valf32x ())
#endif
#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F64X (__builtin_huge_valf64x ())
#endif
#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define HUGE_VAL_F128X (__builtin_huge_valf128x ())
#endif
#ifdef __USE_ISOC99
/* IEEE positive infinity. */