summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/lgamma_productl.c
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-07-20 15:20:51 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-08-31 10:38:11 -0500
commit15089e046b6c71bbefe29687fe4c7e569c9e1c03 (patch)
tree6e857cd8ec0519902d2e4cd16e4f31bda0402584 /sysdeps/ieee754/ldbl-128/lgamma_productl.c
parente9b424881a4f85284e56d8b561c54ff57a7c1c9b (diff)
downloadglibc-15089e046b6c71bbefe29687fe4c7e569c9e1c03.tar.gz
ldbl-128: Rename 'long double' to '_Float128'
Add a layer of macro indirection for long double files which need to be built using another typename. Likewise, add the L(num) macro used in a later patch to override real constants. These macros are only defined through the ldbl-128 math_ldbl.h header, thereby implicitly restricting these macros to machines which back long double with an IEEE binary128 format. Likewise, appropriate changes are made for the few files which indirectly include such ldbl-128 files. These changes produce identical binaries for s390x, aarch64, and ppc64.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/lgamma_productl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/lgamma_productl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sysdeps/ieee754/ldbl-128/lgamma_productl.c b/sysdeps/ieee754/ldbl-128/lgamma_productl.c
index 9aa0137fbb..38cc4bb12c 100644
--- a/sysdeps/ieee754/ldbl-128/lgamma_productl.c
+++ b/sysdeps/ieee754/ldbl-128/lgamma_productl.c
@@ -26,24 +26,24 @@
X_EPS / X is small enough that factors quadratic in it can be
neglected. */
-long double
-__lgamma_productl (long double t, long double x, long double x_eps, int n)
+_Float128
+__lgamma_productl (_Float128 t, _Float128 x, _Float128 x_eps, int n)
{
- long double ret = 0, ret_eps = 0;
+ _Float128 ret = 0, ret_eps = 0;
for (int i = 0; i < n; i++)
{
- long double xi = x + i;
- long double quot = t / xi;
- long double mhi, mlo;
+ _Float128 xi = x + i;
+ _Float128 quot = t / xi;
+ _Float128 mhi, mlo;
mul_splitl (&mhi, &mlo, quot, xi);
- long double quot_lo = (t - mhi - mlo) / xi - t * x_eps / (xi * xi);
+ _Float128 quot_lo = (t - mhi - mlo) / xi - t * x_eps / (xi * xi);
/* We want (1 + RET + RET_EPS) * (1 + QUOT + QUOT_LO) - 1. */
- long double rhi, rlo;
+ _Float128 rhi, rlo;
mul_splitl (&rhi, &rlo, ret, quot);
- long double rpq = ret + quot;
- long double rpq_eps = (ret - rpq) + quot;
- long double nret = rpq + rhi;
- long double nret_eps = (rpq - nret) + rhi;
+ _Float128 rpq = ret + quot;
+ _Float128 rpq_eps = (ret - rpq) + quot;
+ _Float128 nret = rpq + rhi;
+ _Float128 nret_eps = (rpq - nret) + rhi;
ret_eps += (rpq_eps + nret_eps + rlo + ret_eps * quot
+ quot_lo + quot_lo * (ret + ret_eps));
ret = nret;