{"id":812200,"url":"http://patchwork.ozlabs.org/api/patches/812200/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/patch/20170911011654.28743-6-gabriel@inconstante.eti.br/","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170911011654.28743-6-gabriel@inconstante.eti.br>","list_archive_url":null,"date":"2017-09-11T01:16:54","name":"[v2,5/5] Remove conditional on LDBL_MANT_DIG from e_lgammal_r.c","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"505fa311d8283584839cd6e55a99ff597139f976","submitter":{"id":72317,"url":"http://patchwork.ozlabs.org/api/people/72317/?format=json","name":"Gabriel F. T. Gomes","email":"gabriel@inconstante.eti.br"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/20170911011654.28743-6-gabriel@inconstante.eti.br/mbox/","series":[{"id":2426,"url":"http://patchwork.ozlabs.org/api/series/2426/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/list/?series=2426","date":"2017-09-11T01:16:49","name":"Fixes for gcc enabling -mfloat128 by default","version":2,"mbox":"http://patchwork.ozlabs.org/series/2426/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812200/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812200/checks/","tags":{},"related":[],"headers":{"Return-Path":"<libc-alpha-return-84432-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84432-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"I1aPTjWJ\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xr95f2Lrnz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 11:17:42 +1000 (AEST)","(qmail 44733 invoked by alias); 11 Sep 2017 01:17:35 -0000","(qmail 44397 invoked by uid 89); 11 Sep 2017 01:17:34 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-type; q=dns; s=default; b=IdlI/\n\ttDGGHs4T67s6CKND9DJGyVl6VpDuU6xE8UpSB0tYBUaMT7eb5uQxXx5rOf817XTv\n\tJoo0UNHsLmXUxvG/wofip3ps0/qgF0YEC2OIhLXG/c/N4Z2LBEovuU1j3siA3Vmi\n\tJ1lcOrK3H+nsQ6E+mzXt3zWyJj3MM2D0ODyTZ8=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-type; s=default; bh=3tuqa0pxLGZ\n\tkN3YxwcZxLtbIEC4=; b=I1aPTjWJ+7MeDSFvH8PoW+7JfKCXhi5RVwyBPsqORLG\n\tgLtNty+ExcBAFk1LBbBwT6++exapVeR74CxNlwEWETEXZtoVSL5+wn7O2RF6EV4g\n\tlyKKiptBx0Ku6phaFDZrntFWoY/1JD0UR1d7D0tmoywGNEDzprJ4/ZmBjSFYgfkQ\n\t=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-25.0 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH,\n\tRCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=pil,\n\tH*F:D*br","X-HELO":"mo20.mail-out.ovh.net","From":"\"Gabriel F. T. Gomes\" <gabriel@inconstante.eti.br>","To":"<libc-alpha@sourceware.org>","Subject":"[PATCH v2 5/5] Remove conditional on LDBL_MANT_DIG from\n\te_lgammal_r.c","Date":"Sun, 10 Sep 2017 22:16:54 -0300","Message-ID":"<20170911011654.28743-6-gabriel@inconstante.eti.br>","In-Reply-To":"<20170911011654.28743-1-gabriel@inconstante.eti.br>","References":"<20170911011654.28743-1-gabriel@inconstante.eti.br>","MIME-Version":"1.0","Content-Type":"text/plain","X-ClientProxiedBy":"EX1.emp.local (172.16.2.1) To EX2.emp.local (172.16.2.2)","X-Ovh-Tracer-Id":"16441234867994676931","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"0","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrfeelgddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecu"},"content":"New since v1.\n\n-- 8< --\nThe IEEE 754 implementation of lgammal in sysdeps/ieee754/ldbl-128/ used\nto be shared by IBM's implementation in sysdeps/ieee754/ldbl-128ibm/ (by\nan inclusion of the source file).  In order for the algorithm to work\nfor IBM's implementation, a check for LDBL_MANT_DIG was required. Since\nthe source file is no longer shared, the requirement for the check is\ngone.  This patch removes the conditionals.\n\nTested for powerpc64le and s390x.\n\n\t* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):\n\tRemove conditionals on LDBL_MANT_DIG.\n\t* sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c\n\t(__ieee754_lgammal_r): Likewise.\n---\n sysdeps/ieee754/ldbl-128/e_lgammal_r.c    | 6 +-----\n sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c | 6 +-----\n 2 files changed, 2 insertions(+), 10 deletions(-)","diff":"diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c\nindex bef2601bce..a80c9eaf33 100644\n--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c\n+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c\n@@ -73,11 +73,7 @@\n #include <float.h>\n \n static const _Float128 PIL = L(3.1415926535897932384626433832795028841972E0);\n-#if LDBL_MANT_DIG == 106\n-static const _Float128 MAXLGM = L(0x5.d53649e2d469dbc1f01e99fd66p+1012);\n-#else\n static const _Float128 MAXLGM = L(1.0485738685148938358098967157129705071571E4928);\n-#endif\n static const _Float128 one = 1;\n static const _Float128 huge = LDBL_MAX;\n \n@@ -777,7 +773,7 @@ __ieee754_lgammal_r (_Float128 x, int *signgamp)\n \n   if (x < 0)\n     {\n-      if (x < -2 && x > (LDBL_MANT_DIG == 106 ? -48 : -50))\n+      if (x < -2 && x > -50)\n \treturn __lgamma_negl (x, signgamp);\n       q = -x;\n       p = __floorl (q);\ndiff --git a/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c\nindex 2e0c27e36b..84d66c4f5b 100644\n--- a/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c\n+++ b/sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c\n@@ -24,11 +24,7 @@\n #include <float.h>\n \n static const long double PIL = 3.1415926535897932384626433832795028841972E0L;\n-#if LDBL_MANT_DIG == 106\n static const long double MAXLGM = 0x5.d53649e2d469dbc1f01e99fd66p+1012L;\n-#else\n-static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L;\n-#endif\n static const long double one = 1;\n static const long double huge = LDBL_MAX;\n \n@@ -728,7 +724,7 @@ __ieee754_lgammal_r (long double x, int *signgamp)\n \n   if (x < 0)\n     {\n-      if (x < -2 && x > (LDBL_MANT_DIG == 106 ? -48 : -50))\n+      if (x < -2 && x > -48)\n \treturn __lgamma_negl (x, signgamp);\n       q = -x;\n       p = __floorl (q);\n","prefixes":["v2","5/5"]}