From 9ac3c68218b5bcbc40ae9e27b0b13f5e1c81f84c Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Sun, 10 Sep 2017 10:31:47 -0300 Subject: 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. --- sysdeps/ieee754/ldbl-128/e_lgammal_r.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sysdeps/ieee754/ldbl-128') diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c index bef2601bce..a80c9eaf33 100644 --- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c @@ -73,11 +73,7 @@ #include static const _Float128 PIL = L(3.1415926535897932384626433832795028841972E0); -#if LDBL_MANT_DIG == 106 -static const _Float128 MAXLGM = L(0x5.d53649e2d469dbc1f01e99fd66p+1012); -#else static const _Float128 MAXLGM = L(1.0485738685148938358098967157129705071571E4928); -#endif static const _Float128 one = 1; static const _Float128 huge = LDBL_MAX; @@ -777,7 +773,7 @@ __ieee754_lgammal_r (_Float128 x, int *signgamp) if (x < 0) { - if (x < -2 && x > (LDBL_MANT_DIG == 106 ? -48 : -50)) + if (x < -2 && x > -50) return __lgamma_negl (x, signgamp); q = -x; p = __floorl (q); -- cgit 1.4.1