This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH libquadmath/PR68686]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, <burnus at net-b dot de>, <jakub at redhat dot com>
- Date: Mon, 5 Nov 2018 18:19:47 +0000
- Subject: Re: [PATCH libquadmath/PR68686]
- References: <bca16da8-46e7-a274-3724-6472aa6803bd@verizon.net> <9c17f945-539e-01b9-34b8-656ea184b5c1@redhat.com> <681bf291-7e3f-ac95-2c93-d970740aeea9@verizon.net>
On Sun, 4 Nov 2018, Ed Smith-Rowland wrote:
> I looked in glibc. Unfortunately, I see how they have the same mistake:
> glibc/math/w_tgammal_compat.c:
> long double
> __tgammal(long double x)
> {
> int local_signgam;
> long double y = __ieee754_gammal_r(x,&local_signgam);
> ...
> return local_signgam < 0 ? - y : y;
> }
> I'm very sure this is where tgammaq came from.
> Ditto for glibc/math/w_tgamma_compat.c and glibc/math/w_tgammaf_compat.c.
No, that's not a mistake. __ieee754_gammal_r returns +/- the gamma
function and sets the integer pointed to by the second argument to
indicate whether to negate the result. (This isn't a particularly good
interface design for tgamma, as opposed to lgamma; unfortunately
__gammal_r_finite, with this interface, is a public ABI.)
--
Joseph S. Myers
joseph@codesourcery.com