From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id 032CF3945057 for ; Mon, 7 Sep 2020 17:31:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 032CF3945057 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 0E53A3F2D6BB; Mon, 7 Sep 2020 10:31:52 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5tuI0zMUSwyH; Mon, 7 Sep 2020 10:31:50 -0700 (PDT) Received: from keithp.com (koto.keithp.com [10.0.0.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 3356A3F2D6B1; Mon, 7 Sep 2020 10:31:50 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id 189E81582201; Mon, 7 Sep 2020 10:31:50 -0700 (PDT) From: "Keith Packard" To: Jon Turney , "newlib\@sourceware.org" Subject: Re: [PATCH] libm: Fix 'gamma' and 'gammaf' functions. Clean up other gamma code. [v2] In-Reply-To: References: <20200904162527.2145547-1-keithp@keithp.com> Date: Mon, 07 Sep 2020 10:31:49 -0700 Message-ID: <871rjd5w8q.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2020 17:31:54 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jon Turney writes: > Does the documentation (embedded in some comments at the start of=20 > w_gamma.c) for these functions need updating? I'm not sure if the=20 > 'RETURNS' section is correct now? Yes, lgamma(gamma) returns ERANGE for all overflows and poles. tgamma returns EDOM for negative integers and -INFINITY, but ERANGE for zero or overflow as per current POSIX specs. C17 allows some variation in the errors for tgamma, allowing either domain or pole errors for non-positive integers, which seems inconsistent with IEEE754 to me. > There's also a comment about the historical renaming which might be=20 > better exposed as a part of 'NOTES'? Perhaps? =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl9WboUACgkQ2yIaaQAA ABHAiA/+NbTDJ8cO73PEsxZEvZrF6aNEVDGcLegYpKMW/r/9Q4WSizxxcXOHtjMm TE7f0FPKfTQnd7mLJpsLWWrELMacq/v/b1S80i5wZ048u/ZZaGmJeBP5eS3hG5bF faypCP5+nNe1Npl/N3dAFT7tqikzPDamf6IVZ8JvRqL0XwpKspUZO8i0FUjeJlph 0xFTt7dTPyKXcpE1ELOwaLAtyPRyzXmteMeokoENBiOx0R4ATgZ5wPZPb390rWwA 8xyo3P7lX9UAkVp7lBywbV3sgZ3zn8saYpMbF/WDEAOT6JRLSEGq1pt8n0QcBS7T WCvO7Ce5TpMW8uwcJtUQjBLsHKYb8P0QLUZhHcfQf8Xro5hcLgDTIssWkXNN49F+ /n04j0bEObdYfg7bUbClbnNTe4iQpyEYdkivcpByRO32cpB7VkbvAO/N95eK/Eh1 1C0f76W68gH4l38LCy2eGMpC85uBBgc6pZLpKu/A72U8pSgFOlFXCtACNg/8yR/g HFAu4Z40vEkCHKNRz+ODpCITnGzmT8+KxAJUxEmqUYJwul68SbiPoVHrSnohbwVC 3hpdI7uXmJLX1Ej05x/nQZoUWCxpmD54SEIZBoCJd1ojrA2E1vgaIn79dGOg1zFz ur5rkQrUhDEq7GkAZAc48Uzuv23CuBngPMdGDfIh8AONNaNUGjo= =lD1o -----END PGP SIGNATURE----- --=-=-=--