Date: Sat, 14 Jul 2001 15:35:04 -0500 (CDT) From: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/28972: gamma returns same result as lgamma Message-ID: <200107142035.f6EKZ4p85660@cauchy.math.missouri.edu>
next in thread | raw e-mail | index | archive | help
>Number: 28972
>Category: bin
>Synopsis: gamma returns same result as lgamma
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 14 13:40:27 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Stephen Montgomery-Smith
>Release: FreeBSD 4.3-STABLE i386
>Organization:
University of Missouri
>Environment:
System: FreeBSD cauchy 4.3-STABLE FreeBSD 4.3-STABLE #0: Tue Jun 26 20:41:11 CDT 2001 stephen@cauchy:/usr/obj/usr/src/sys/cauchy i386
>Description:
The function gamma in the math library gives the wrong answer - it gives the
same answer as lgamma. For example gamma(6) should be 120. The following
C program gives 4.78749 which is log(120).
>How-To-Repeat:
#include <stdio.h>
#include <math.h>
main() {
double x=6;
printf("%g %g %g %g\n",x,gamma(x),lgamma(x),exp(lgamma(x)));
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107142035.f6EKZ4p85660>
