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

Ed Smith-Rowland 3dw4rd@verizon.net
Mon Nov 13 18:47:00 GMT 2017


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 signs for -0.5Q, -1.5Q, -2.5Q, etc.

Another test verifies the Gamma reflection formula:

  tgamma(1-x) * tgamma(x) - pi / sinq(pi*x) is tiny.

Builds on x86_64-linux and tests correctly offline.


OK?


-------------- next part --------------
2017-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR libquadmath/68686
	* math/tgammaq.c: Correct sign for negative argument.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tgammaq.patch
Type: text/x-patch
Size: 455 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20171113/2a954641/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr68686.c
Type: text/x-csrc
Size: 903 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20171113/2a954641/attachment-0001.bin>


More information about the Gcc-patches mailing list