diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2001-11-05 10:10:33 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2001-11-05 10:10:33 +0000 |
commit | f8a5b8b8e0f1c87d1176a4c5c2603581148fdad2 (patch) | |
tree | d8887009d765d5cb91b1cc6bc5e93830b88967c7 /lib | |
parent | 021d2ea214a30ad372a5b46656c8b0aea2a3ad0c (diff) | |
download | FreeBSD-src-f8a5b8b8e0f1c87d1176a4c5c2603581148fdad2.zip FreeBSD-src-f8a5b8b8e0f1c87d1176a4c5c2603581148fdad2.tar.gz |
gamma(x) actually returns \log(|\Gamma(x)|), so correct the man
page and add an historical note explaining this. This patch is
based on Stephen's.
We still need someone to implement tgamma.
PR: 28972, 31764
Submitted by: Stephen Montgomery-Smith <stephen@math.missouri.edu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/msun/man/lgamma.3 | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/lib/msun/man/lgamma.3 b/lib/msun/man/lgamma.3 index ec094cc..279eb3e 100644 --- a/lib/msun/man/lgamma.3 +++ b/lib/msun/man/lgamma.3 @@ -78,7 +78,7 @@ returns the sign of \(*G(x). .Fn gamma x and .Fn gammaf x -return \(*G(x), with no effect on +return ln\||\(*G(x)|, with no effect on .Fa signgam . .Sh IDIOSYNCRASIES Do not use the expression @@ -94,16 +94,16 @@ Only after or .Fn lgammaf has returned can signgam be correct. -.Pp -For arguments in its range, -.Fn gamma -and -.Fn gammaf -is preferred, as for positive arguments -it is accurate to within one unit in the last place. -Exponentiation of -.Fn lgamma -will lose up to 10 significant bits. +.\.Pp +.\For arguments in its range, +.\.Fn gamma +.\and +.\.Fn gammaf +.\is preferred, as for positive arguments +.\it is accurate to within one unit in the last place. +.\Exponentiation of +.\.Fn lgamma +.\will lose up to 10 significant bits. .Sh RETURN VALUES .Fn gamma , .Fn gammaf , @@ -133,9 +133,21 @@ function appeared in The .Fn gamma function appeared in -.Bx 4.4 . -The name +.Bx 4.4 +as a function which computed \(*G(x). +In many older libraries the function .Fn gamma -was originally dedicated to the -.Fn lgamma -function, so some old code may no longer be compatible. +calculated the same value as +.Fn lgamma . +Now +.Fn gamma +computes ln\||\(*G(x)|, +but it uses a different algorithm, +and it does not set +.Fa signgam . +The +.St -isoC-99 +standard specifies a function +.Fn tgamma +for computing \(*G(x). +This function is currently unimplimented in this library. |