about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-10 10:31:47 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-21 17:37:40 -0300
commit9ac3c68218b5bcbc40ae9e27b0b13f5e1c81f84c (patch)
treedce9b922ed320f7bb6900c10a23e2bad1a2a6e93 /sysdeps/ieee754/ldbl-128ibm
parentd2f0ed09f88195dbeaa8a667b2d3ffa5423562a1 (diff)
downloadglibc-9ac3c68218b5bcbc40ae9e27b0b13f5e1c81f84c.tar.gz
glibc-9ac3c68218b5bcbc40ae9e27b0b13f5e1c81f84c.tar.xz
glibc-9ac3c68218b5bcbc40ae9e27b0b13f5e1c81f84c.zip
Remove conditional on LDBL_MANT_DIG from e_lgammal_r.c
The IEEE 754 implementation of lgammal in sysdeps/ieee754/ldbl-128/ used
to be shared by IBM's implementation in sysdeps/ieee754/ldbl-128ibm/ (by
an inclusion of the source file).  In order for the algorithm to work
for IBM's implementation, a check for LDBL_MANT_DIG was required. Since
the source file is no longer shared, the requirement for the check is
gone.  This patch removes the conditionals.

Tested for powerpc64le and s390x.

	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
	Remove conditionals on LDBL_MANT_DIG.
	* sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
	(__ieee754_lgammal_r): Likewise.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
index 474773e81d..f881b8c0a4 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
@@ -23,11 +23,7 @@
 #include <float.h>
 
 static const long double PIL = 3.1415926535897932384626433832795028841972E0L;
-#if LDBL_MANT_DIG == 106
 static const long double MAXLGM = 0x5.d53649e2d469dbc1f01e99fd66p+1012L;
-#else
-static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L;
-#endif
 static const long double one = 1;
 static const long double huge = LDBL_MAX;
 
@@ -727,7 +723,7 @@ __ieee754_lgammal_r (long double x, int *signgamp)
 
   if (x < 0)
     {
-      if (x < -2 && x > (LDBL_MANT_DIG == 106 ? -48 : -50))
+      if (x < -2 && x > -48)
 	return __lgamma_negl (x, signgamp);
       q = -x;
       p = __floorl (q);