[Bug libquadmath/68686] tgammaq(x) is always negative for noninteger x < 0
3dw4rd at verizon dot net
gcc-bugzilla@gcc.gnu.org
Wed Mar 29 21:16:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68686
--- Comment #4 from Ed Smith-Rowland <3dw4rd at verizon dot net> ---
Created attachment 41079
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41079&action=edit
Correct sign of negative arg tgammaq.
Basically,
return (x > 0.0Q || (int)(-x) & 1) ? +res : -res;
CL:
2017-03-29 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libquadmath/68686
* math/tgammaq.c: Correct sign for negative argument.
* testsuite/pr68686.c
We need a testsuite for libquadmath?
pr68686.c
--------------------------------------------------------
#include <quadmath.h>
#include <assert.h>
int
main(void)
{
__float128 result = tgammaq(-1.5Q);
assert(result > 0.0Q);
result = tgammaq(-2.5Q);
assert(result < 0.0Q);
return 0;
}
--------------------------------------------------------
More information about the Gcc-bugs
mailing list