public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug math/27617] New: tgamma integer wrapping results in inaccurate result. @ 2021-03-21 0:26 brchrisman at gmail dot com 2021-03-21 1:02 ` [Bug math/27617] " brchrisman at gmail dot com ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: brchrisman at gmail dot com @ 2021-03-21 0:26 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=27617 Bug ID: 27617 Summary: tgamma integer wrapping results in inaccurate result. Product: glibc Version: 2.32 Status: UNCONFIRMED Severity: normal Priority: P2 Component: math Assignee: unassigned at sourceware dot org Reporter: brchrisman at gmail dot com Target Milestone: --- For integer parameters greater than 6, tgamma(n+1) != n! (note: 719 and beyond are off-by-one, while the real parameter at the bottom results in 720) #include <iostream> #include <cmath> using namespace std; int main(void) { uint64_t foo; for(int i=0; i < 10; i++) { foo = tgamma(i); cout << foo << "\n"; } cout << tgamma(7.0) << "\n"; } 0 1 1 2 6 24 120 719 5039 40319 720 -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/27617] tgamma integer wrapping results in inaccurate result. 2021-03-21 0:26 [Bug math/27617] New: tgamma integer wrapping results in inaccurate result brchrisman at gmail dot com @ 2021-03-21 1:02 ` brchrisman at gmail dot com 2021-03-21 1:50 ` brchrisman at gmail dot com 2021-03-21 1:51 ` brchrisman at gmail dot com 2 siblings, 0 replies; 4+ messages in thread From: brchrisman at gmail dot com @ 2021-03-21 1:02 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=27617 Brian Chrisman <brchrisman at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brchrisman at gmail dot com -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/27617] tgamma integer wrapping results in inaccurate result. 2021-03-21 0:26 [Bug math/27617] New: tgamma integer wrapping results in inaccurate result brchrisman at gmail dot com 2021-03-21 1:02 ` [Bug math/27617] " brchrisman at gmail dot com @ 2021-03-21 1:50 ` brchrisman at gmail dot com 2021-03-21 1:51 ` brchrisman at gmail dot com 2 siblings, 0 replies; 4+ messages in thread From: brchrisman at gmail dot com @ 2021-03-21 1:50 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=27617 --- Comment #1 from Brian Chrisman <brchrisman at gmail dot com> --- Apologies, this is not a bug as I misread the return types supported to include integers when they don't. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug math/27617] tgamma integer wrapping results in inaccurate result. 2021-03-21 0:26 [Bug math/27617] New: tgamma integer wrapping results in inaccurate result brchrisman at gmail dot com 2021-03-21 1:02 ` [Bug math/27617] " brchrisman at gmail dot com 2021-03-21 1:50 ` brchrisman at gmail dot com @ 2021-03-21 1:51 ` brchrisman at gmail dot com 2 siblings, 0 replies; 4+ messages in thread From: brchrisman at gmail dot com @ 2021-03-21 1:51 UTC (permalink / raw) To: glibc-bugs https://sourceware.org/bugzilla/show_bug.cgi?id=27617 Brian Chrisman <brchrisman at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTABUG Status|UNCONFIRMED |RESOLVED --- Comment #2 from Brian Chrisman <brchrisman at gmail dot com> --- tgamma(7) correctly returns 719.9999... -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-21 1:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-21 0:26 [Bug math/27617] New: tgamma integer wrapping results in inaccurate result brchrisman at gmail dot com 2021-03-21 1:02 ` [Bug math/27617] " brchrisman at gmail dot com 2021-03-21 1:50 ` brchrisman at gmail dot com 2021-03-21 1:51 ` brchrisman at gmail dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).