This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/4407] New: signgam value for lgamma on special values
- From: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Apr 2007 21:39:01 -0000
- Subject: [Bug math/4407] New: signgam value for lgamma on special values
- Reply-to: sourceware-bugzilla at sourceware dot org
The signgam value is incorrect for lgamma(-0.), at least on x86 and PowerPC (and
various glibc versions): it is 1, whereas it should be -1 (since tgamma(-0.) is
-inf). For instance, sysdeps/ieee754/dbl-64/e_lgamma_r.c contains:
if((ix|lx)==0) return one/fabs(x);
i.e. it lets signgam to the value 1, even when x is -0. Other files contains the
same error.
Moreover, on values where tgamma is NaN, the glibc sets signgam to 1. But is
this correct? The POSIX standard is silent on this point, but as the sign isn't
defined, the value of signgam could be left unchanged (and I don't think that
taking into account the sign of the NaN returned by tgamma doesn't really make
much sense). In any case, this should be documented.
--
Summary: signgam value for lgamma on special values
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: math
AssignedTo: aj at suse dot de
ReportedBy: vincent+libc at vinc17 dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4407
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.