diff options
author | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2017-05-04 17:00:33 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com> | 2017-05-15 10:23:28 -0300 |
commit | 81f26b53b5e9a3520fb3cfd0be743339e13dfb56 (patch) | |
tree | 13b24c1c3a98b50ccbd0d8a6ea20edf34716284e /include | |
parent | 33d523d7f8c8ffdeecd03df452d80bfda3bc25d4 (diff) | |
download | glibc-81f26b53b5e9a3520fb3cfd0be743339e13dfb56.zip glibc-81f26b53b5e9a3520fb3cfd0be743339e13dfb56.tar.gz glibc-81f26b53b5e9a3520fb3cfd0be743339e13dfb56.tar.bz2 |
float128: Add private _Float128 declarations for libm.
Add the necessary bits to the private headers to support
building the _Float128 libm functions.
A local override for float.h is provided to include the
missing *FLT128 macros implied by TS 18661-3 for this
type when compiling prior to GCC 7.
* include/complex.h (__kernel_casinhf128): New declaration.
* include/float.h: New file.
* include/math.h (__finitef128): Add a hidden def.
(__isinff128): Likewise.
(__isnanf128): Likewise.
(__fpclassify): Likewise.
(__issignalling): Likewise.
(__expf128): Likewise.
(__expm1f128): Likewise.
* sysdeps/generic/fix-fp-int-convert-overflow.h:
(FIX_FLT128_LONG_CONVERT_OVERFLOW): New macro.
(FIX_FLT128_LLONG_CONVERT_OVERFLOW): Likewise.
* sysdeps/generic/math-type-macros-float128.h: New file.
* sysdeps/generic/math_private.h: Include bits/floatn.h and
math_private_calls.h for _Float128.
(__isinff128): New inline implementation used when GCC < 7.0,
since in this case __builtin_isinf_sign is broken.
(fabsf128): New inline implementation that calls the builtin.
(__EXPR_FLT128): New macro.
(min_of_type): Optionally include _Float128 types too.
* sysdeps/generic/math_private_calls.h (__kernel_sincos):
Declare for _Float128.
(__kernel_rem_pio2): Likewise.
* sysdeps/ieee754/ldbl-opt/s_sin.c:
(__DECL_SIMD_sincos_disablef128): New macro.
Diffstat (limited to 'include')
-rw-r--r-- | include/complex.h | 3 | ||||
-rw-r--r-- | include/float.h | 31 | ||||
-rw-r--r-- | include/math.h | 13 |
3 files changed, 47 insertions, 0 deletions
diff --git a/include/complex.h b/include/complex.h index 082e71f..2c86709 100644 --- a/include/complex.h +++ b/include/complex.h @@ -8,6 +8,9 @@ extern complex float __kernel_casinhf (complex float z, int adj); extern complex double __kernel_casinh (complex double z, int adj); extern complex long double __kernel_casinhl (complex long double z, int adj); +# if __HAVE_DISTINCT_FLOAT128 +extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj); +# endif # endif #endif diff --git a/include/float.h b/include/float.h new file mode 100644 index 0000000..20c4acb --- /dev/null +++ b/include/float.h @@ -0,0 +1,31 @@ +#ifndef _LIBC_FLOAT_H +#define _LIBC_FLOAT_H + +#ifndef _ISOMAC +# define __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif + +#include_next <float.h> + +/* Supplement float.h macros for _Float128 for older compilers + which do not yet support the type. These are described in + TS 18661-3. */ +#ifndef _ISOMAC +# include <features.h> +# include <bits/floatn.h> +# if !__GNUC_PREREQ (7, 0) && __HAVE_DISTINCT_FLOAT128 +# define FLT128_MANT_DIG 113 +# define FLT128_DECIMAL_DIG 36 +# define FLT128_DIG 33 +# define FLT128_MIN_EXP (-16381) +# define FLT128_MIN_10_EXP (-4931) +# define FLT128_MAX_EXP 16384 +# define FLT128_MAX_10_EXP 4932 +# define FLT128_MAX 1.18973149535723176508575932662800702e+4932Q +# define FLT128_EPSILON 1.92592994438723585305597794258492732e-34Q +# define FLT128_MIN 3.36210314311209350626267781732175260e-4932Q +# define FLT128_TRUE_MIN 6.47517511943802511092443895822764655e-4966Q +# endif +#endif + +#endif /* _LIBC_FLOAT_H */ diff --git a/include/math.h b/include/math.h index 6ff6783..a069680 100644 --- a/include/math.h +++ b/include/math.h @@ -26,6 +26,12 @@ hidden_proto (__finitel) hidden_proto (__isinfl) hidden_proto (__isnanl) # endif + +# if __HAVE_DISTINCT_FLOAT128 +hidden_proto (__finitef128) +hidden_proto (__isinff128) +hidden_proto (__isnanf128) +# endif # endif libm_hidden_proto (__fpclassify) @@ -43,5 +49,12 @@ libm_hidden_proto (__expl) libm_hidden_proto (__expm1l) # endif +# if __HAVE_DISTINCT_FLOAT128 +libm_hidden_proto (__fpclassifyf128) +libm_hidden_proto (__issignalingf128) +libm_hidden_proto (__expf128) +libm_hidden_proto (__expm1f128) +# endif + #endif #endif |