Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Joseph Myers
On Mon, 5 Nov 2018, Jakub Jelinek wrote: > On Fri, Nov 02, 2018 at 11:43:03PM +, Joseph Myers wrote: > > Here's an updated version of the patch that also updates most of the > > previously omitted libquadmath/math/ files that are based on glibc sources > > (not fmaq.c or rem_pio2q.c), includ

Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Ed Smith-Rowland
On 11/5/18 1:19 PM, Joseph Myers wrote: 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 =

Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Joseph Myers
On Sun, 4 Nov 2018, Ed Smith-Rowland wrote: > I *do* think a couple tests should be added to test-signgam-*.c to test > alternation of signs: The main tests for results of libm functions are in auto-libm-test-in (from which auto-libm-test-out-* are generated by gen-auto-libm-tests.c) and libm-t

Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Joseph Myers
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_signga

Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Jakub Jelinek
On Fri, Nov 02, 2018 at 11:43:03PM +, Joseph Myers wrote: > Here's an updated version of the patch that also updates most of the > previously omitted libquadmath/math/ files that are based on glibc sources > (not fmaq.c or rem_pio2q.c), including *gamma*. It adds exp2q and > issignalingq as

Re: [PATCH libquadmath/PR68686]

2018-11-05 Thread Joseph Myers
On Sat, 3 Nov 2018, Jeff Law wrote: > Note that Joseph's follow-up doesn't touch on the gamma problem AFAICT, > but instead touches on the larger issues around trying to keep the > quadmath implementations between glibc and gcc more in sync. The second version of my patch

Re: [PATCH libquadmath/PR68686]

2018-11-04 Thread Ed Smith-Rowland
On 11/3/18 10:09 PM, Jeff Law wrote: On 10/23/18 7:45 PM, Ed Smith-Rowland wrote: Greetings, This is an almost trivial patch to get the correct sign for tgammaq. I don't have a testcase as I don't know where to put one. OK? Ed Smith-Rowland tgammaq.CL 2018-10-24 Edward Smith-Rowland <3

Re: [PATCH libquadmath/PR68686]

2018-11-04 Thread Ed Smith-Rowland
On 11/3/18 10:09 PM, Jeff Law wrote: On 10/23/18 7:45 PM, Ed Smith-Rowland wrote: Greetings, This is an almost trivial patch to get the correct sign for tgammaq. I don't have a testcase as I don't know where to put one. OK? Ed Smith-Rowland tgammaq.CL 2018-10-24 Edward Smith-Rowland <3

Re: [PATCH libquadmath/PR68686]

2018-11-03 Thread Jeff Law
On 10/23/18 7:45 PM, Ed Smith-Rowland wrote: > Greetings, > > This is an almost trivial patch to get the correct sign for tgammaq. > > I don't have a testcase as I don't know where to put one. > > OK? > > Ed Smith-Rowland > > > > tgammaq.CL > > 2018-10-24 Edward Smith-Rowland <3dw...@veri

Re: [PATCH libquadmath/PR68686]

2018-11-02 Thread Joseph Myers
On Fri, 2 Nov 2018, Joseph Myers wrote: > I think it would be best to move to having a script to generate > libquadmath sources automatically from glibc sources by appropriate > substitutions, so that while you might need to update the script or > quadmath-imp.h as part of updating libquadmath

Re: [PATCH libquadmath/PR68686]

2018-11-02 Thread Joseph Myers
On Wed, 24 Oct 2018, Jakub Jelinek wrote: > On Tue, Oct 23, 2018 at 09:45:13PM -0400, Ed Smith-Rowland wrote: > > Greetings, > > > > This is an almost trivial patch to get the correct sign for tgammaq. > > Doesn't look trivial to me. What happens if x is a NaN? Or if x is outside > of the rang

Re: [PATCH libquadmath/PR68686]

2018-10-24 Thread Jakub Jelinek
On Tue, Oct 23, 2018 at 09:45:13PM -0400, Ed Smith-Rowland wrote: > Greetings, > > This is an almost trivial patch to get the correct sign for tgammaq. Doesn't look trivial to me. What happens if x is a NaN? Or if x is outside of the range of int? Generally, libquadmath follows what glibc does

[PATCH libquadmath/PR68686]

2018-10-23 Thread Ed Smith-Rowland
Greetings, This is an almost trivial patch to get the correct sign for tgammaq. I don't have a testcase as I don't know where to put one. OK? Ed Smith-Rowland 2018-10-24 Edward Smith-Rowland <3dw...@verizon.net> PR libquadmath/68686 * math/tgammaq.c: Correct sign for negative argument.

Re: [PATCH libquadmath, pr68686] tgammaq(x) is always negative for noninteger x < 0

2017-11-14 Thread Steve Kargl
Ed, gfortran uses libquadmath for support of its REAL(16) intrinsic subprograms. I checked the list of intrinsics and tgamma is current not in the list. I don't have time to try Fortran's C interop feature to see if an ordinary user can access __float128. While your patch is probably useful for

[PATCH libquadmath, pr68686] tgammaq(x) is always negative for noninteger x < 0

2017-11-13 Thread Ed Smith-Rowland
Here is a patch for tammaq for negative argument pr68686. I know about depending on ports from upstream but this was done recently and this (tgammaq) was left out. This patch is basically a one-liner. I have test cases but libquadmath doesn't have a testsuite. One test just shows alternating