Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2001 07:20:01 -0700 (PDT)
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/28972: gamma returns same result as lgamma
Message-ID:  <200107151420.f6FEK1151552@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/28972; it has been noted by GNATS.

From: Stephen Montgomery-Smith <stephen@math.missouri.edu>
To: Bruce Evans <bde@zeta.org.au>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/28972: gamma returns same result as lgamma
Date: Sun, 15 Jul 2001 09:13:40 -0500

 So we should fix the man page then?  Does gamma set signgam?
 
 I did a diff on the source code for gamma and lgamma and they did seem
 very different, at least superficially.
 
 The man page is very broken.  It includes comments like:
 
      For arguments in its range, gamma() and gammaf() is preferred, as
 for
      positive arguments it is accurate to within one unit in the last
 place.
      Exponentiation of lgamma() will lose up to 10 significant bits.
 
 
 Bruce Evans wrote:
 > 
 > On Sat, 14 Jul 2001, Stephen Montgomery-Smith wrote:
 > 
 > > The function gamma in the math library gives the wrong answer - it gives the
 > > same answer as lgamma. ...
 > 
 > This is intentional (except for the broken man page).  gamma was actually
 > the log of gamma in many old Unix libraries.  I think these libraries had
 > no actual gamma function.  I'm not sure if they had the log of gamma named
 > as lgamma.
 
 -- 
 Stephen Montgomery-Smith
 stephen@math.missouri.edu
 http://www.math.missouri.edu/~stephen

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?200107151420.f6FEK1151552>