Summary: | tgamma() sets errno inconsistently for domain error | ||
---|---|---|---|
Product: | glibc | Reporter: | Michael Kerrisk <mtk.manpages> |
Component: | math | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | glibc-bugs |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | test program |
Description
Michael Kerrisk
2008-07-31 13:34:14 UTC
Created attachment 2881 [details]
test program
Test runs demonstrating the problem:
$ /tmp/mt_tgamma -- -1
errno == EDOM
fetestexcept() says: FE_INVALID
tgamma(-1.00000000000000000e+00)=nan
EDOM FE_INVALID nan
$ /tmp/mt_tgamma -- -inf
errno == 0
fetestexcept() says: FE_INVALID
tgamma(-inf)=nan
0 FE_INVALID nan
Confirmed with current sources on both x86 and x86_64. Fixed for 2.18 by: commit ab2b94613d85ba9edc659bd5e930b9ab1ec8e8a9 Author: Joseph Myers <joseph@codesourcery.com> Date: Fri May 10 11:35:11 2013 +0000 Fix tgamma errno setting on domain error (bug 6809). |