aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-08-08 15:49:31 -0500
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2017-05-25 09:01:37 -0300
commit302bb1a3c327d546b19447d7304bb2b27e9a34de (patch)
treeb59f8fc1fbb96d9905e86e3130d8668616bfc40a /math
parent6a2c695266fab34cc057256d1b33d2268183f00e (diff)
downloadglibc-302bb1a3c327d546b19447d7304bb2b27e9a34de.tar
glibc-302bb1a3c327d546b19447d7304bb2b27e9a34de.tar.gz
glibc-302bb1a3c327d546b19447d7304bb2b27e9a34de.tar.bz2
glibc-302bb1a3c327d546b19447d7304bb2b27e9a34de.zip
float128: Add wrappers to override ldbl-128 as float128.
This change defines float128_private.h which contains macros used to override long double naming conventions when building a ldbl file. * math/math.h [__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF128): New macro. * math/e_sqrtf128.c: New file. * math/s_fmaxmag_template.c: Include math_private.h in order to make inline expansion of fabs128(). * math/s_fminmag_template.c: Likewise. * sysdeps/ieee754/float128/e_acosf128.c: New file. * sysdeps/ieee754/float128/e_acoshf128.c: New file. * sysdeps/ieee754/float128/e_asinf128.c: New file. * sysdeps/ieee754/float128/e_atan2f128.c: New file. * sysdeps/ieee754/float128/e_atanhf128.c: New file. * sysdeps/ieee754/float128/e_coshf128.c: New file. * sysdeps/ieee754/float128/e_exp10f128.c: New file. * sysdeps/ieee754/float128/e_expf128.c: New file. * sysdeps/ieee754/float128/e_fmodf128.c: New file. * sysdeps/ieee754/float128/e_gammaf128_r.c: New file. * sysdeps/ieee754/float128/e_hypotf128.c: New file. * sysdeps/ieee754/float128/e_ilogbf128.c: New file. * sysdeps/ieee754/float128/e_j0f128.c: New file. * sysdeps/ieee754/float128/e_j1f128.c: New file. * sysdeps/ieee754/float128/e_jnf128.c: New file. * sysdeps/ieee754/float128/e_lgammaf128_r.c: New file. * sysdeps/ieee754/float128/e_log10f128.c: New file. * sysdeps/ieee754/float128/e_log2f128.c: New file. * sysdeps/ieee754/float128/e_logf128.c: New file. * sysdeps/ieee754/float128/e_powf128.c: New file. * sysdeps/ieee754/float128/e_rem_pio2f128.c: New file. * sysdeps/ieee754/float128/e_remainderf128.c: New file. * sysdeps/ieee754/float128/e_scalbf128.c: New file. * sysdeps/ieee754/float128/e_sinhf128.c: New file. * sysdeps/ieee754/float128/float128_private.h: New file. * sysdeps/ieee754/float128/gamma_productf128.c: New file. * sysdeps/ieee754/float128/ieee754_float128.h: New file. * sysdeps/ieee754/float128/k_cosf128.c: New file. * sysdeps/ieee754/float128/k_sincosf128.c: New file. * sysdeps/ieee754/float128/k_sinf128.c: New file. * sysdeps/ieee754/float128/k_tanf128.c: New file. * sysdeps/ieee754/float128/lgamma_negf128.c: New file. * sysdeps/ieee754/float128/lgamma_productf128.c: New file. * sysdeps/ieee754/float128/s_asinhf128.c: New file. * sysdeps/ieee754/float128/s_atanf128.c: New file. * sysdeps/ieee754/float128/s_cbrtf128.c: New file. * sysdeps/ieee754/float128/s_ceilf128.c: New file. * sysdeps/ieee754/float128/s_copysignf128.c: New file. * sysdeps/ieee754/float128/s_cosf128.c: New file. * sysdeps/ieee754/float128/s_erff128.c: New file. * sysdeps/ieee754/float128/s_expm1f128.c: New file. * sysdeps/ieee754/float128/s_fabsf128.c: New file. * sysdeps/ieee754/float128/s_finitef128.c: New file. * sysdeps/ieee754/float128/s_floorf128.c: New file. * sysdeps/ieee754/float128/s_fmaf128.c: New file. * sysdeps/ieee754/float128/s_fpclassifyf128.c: New file. * sysdeps/ieee754/float128/s_frexpf128.c: New file. * sysdeps/ieee754/float128/s_fromfpf128.c: New file. * sysdeps/ieee754/float128/s_fromfpxf128.c: New file. * sysdeps/ieee754/float128/s_getpayloadf128.c: New file. * sysdeps/ieee754/float128/s_isinff128.c: New file. * sysdeps/ieee754/float128/s_isnanf128.c: New file. * sysdeps/ieee754/float128/s_issignalingf128.c: New file. * sysdeps/ieee754/float128/s_llrintf128.c: New file. * sysdeps/ieee754/float128/s_llroundf128.c: New file. * sysdeps/ieee754/float128/s_log1pf128.c: New file. * sysdeps/ieee754/float128/s_logbf128.c: New file. * sysdeps/ieee754/float128/s_lrintf128.c: New file. * sysdeps/ieee754/float128/s_lroundf128.c: New file. * sysdeps/ieee754/float128/s_modff128.c: New file. * sysdeps/ieee754/float128/s_nearbyintf128.c: New file. * sysdeps/ieee754/float128/s_nextafterf128.c: New file. * sysdeps/ieee754/float128/s_nexttowardf128.c: New file. * sysdeps/ieee754/float128/s_nextupf128.c: New file. * sysdeps/ieee754/float128/s_remquof128.c: New file. * sysdeps/ieee754/float128/s_rintf128.c: New file. * sysdeps/ieee754/float128/s_roundevenf128.c: New file. * sysdeps/ieee754/float128/s_roundf128.c: New file. * sysdeps/ieee754/float128/s_scalblnf128.c: New file. * sysdeps/ieee754/float128/s_scalbnf128.c: New file. * sysdeps/ieee754/float128/s_setpayloadf128.c: New file. * sysdeps/ieee754/float128/s_setpayloadsigf128.c: New file. * sysdeps/ieee754/float128/s_signbitf128.c: New file. * sysdeps/ieee754/float128/s_significandf128.c: New file. * sysdeps/ieee754/float128/s_sincosf128.c: New file. * sysdeps/ieee754/float128/s_sinf128.c: New file. * sysdeps/ieee754/float128/s_tanf128.c: New file. * sysdeps/ieee754/float128/s_tanhf128.c: New file. * sysdeps/ieee754/float128/s_totalorderf128.c: New file. * sysdeps/ieee754/float128/s_totalordermagf128.c: New file. * sysdeps/ieee754/float128/s_truncf128.c: New file. * sysdeps/ieee754/float128/s_ufromfpf128.c: New file. * sysdeps/ieee754/float128/s_ufromfpxf128.c: New file. * sysdeps/ieee754/float128/t_sincosf128.c: New file. * sysdeps/ieee754/float128/x2y2m1f128.c: New file. * sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h: (__iscanonicalf128): Define as a macro.
Diffstat (limited to 'math')
-rw-r--r--math/e_sqrtf128.c14
-rw-r--r--math/math.h3
-rw-r--r--math/s_fmaxmag_template.c1
-rw-r--r--math/s_fminmag_template.c1
4 files changed, 19 insertions, 0 deletions
diff --git a/math/e_sqrtf128.c b/math/e_sqrtf128.c
new file mode 100644
index 0000000000..acf8ba45e3
--- /dev/null
+++ b/math/e_sqrtf128.c
@@ -0,0 +1,14 @@
+#include <math.h>
+#include <stdio.h>
+#include <errno.h>
+
+_Float128
+__ieee754_sqrtf128 (_Float128 x)
+{
+ fputs ("__ieee754_sqrtf128 not implemented\n", stderr);
+ __set_errno (ENOSYS);
+ return 0.0;
+}
+strong_alias (__ieee754_sqrtf128, __sqrtf128_finite)
+
+stub_warning (sqrtf128)
diff --git a/math/math.h b/math/math.h
index 5f006a8358..e21708045a 100644
--- a/math/math.h
+++ b/math/math.h
@@ -64,6 +64,9 @@ __BEGIN_DECLS
# define SNANL (__builtin_nansl (""))
# endif
#endif
+#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# define SNANF128 (__builtin_nansf128 (""))
+#endif
/* Get __GLIBC_FLT_EVAL_METHOD. */
#include <bits/flt-eval-method.h>
diff --git a/math/s_fmaxmag_template.c b/math/s_fmaxmag_template.c
index 6beef03292..f7c824886c 100644
--- a/math/s_fmaxmag_template.c
+++ b/math/s_fmaxmag_template.c
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <math_private.h>
FLOAT
M_DECL_FUNC (__fmaxmag) (FLOAT x, FLOAT y)
diff --git a/math/s_fminmag_template.c b/math/s_fminmag_template.c
index a1e4c2b135..1054c38411 100644
--- a/math/s_fminmag_template.c
+++ b/math/s_fminmag_template.c
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <math_private.h>
FLOAT
M_DECL_FUNC (__fminmag) (FLOAT x, FLOAT y)