lgamma.3 (93204) | lgamma.3 (93211) |
---|---|
1.\" Copyright (c) 1985, 1991 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 | 1.\" Copyright (c) 1985, 1991 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 16 unchanged lines hidden (view full) --- 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 |
33.\" $FreeBSD: head/lib/msun/man/lgamma.3 93204 2002-03-26 10:18:20Z bde $ | 33.\" $FreeBSD: head/lib/msun/man/lgamma.3 93211 2002-03-26 11:59:29Z bde $ |
34.\" 35.Dd December 3, 1992 36.Dt LGAMMA 3 37.Os 38.Sh NAME 39.Nm lgamma , 40.Nm lgammaf , 41.Nm gamma , | 34.\" 35.Dd December 3, 1992 36.Dt LGAMMA 3 37.Os 38.Sh NAME 39.Nm lgamma , 40.Nm lgammaf , 41.Nm gamma , |
42.Nm gammaf 43.Nd log gamma functions, gamma functions | 42.Nm gammaf , 43.Nm tgamma 44.Nd log gamma functions, gamma function |
44.Sh LIBRARY 45.Lb libm 46.Sh SYNOPSIS 47.In math.h 48.Ft extern int 49.Fa signgam ; 50.sp 51.Ft double 52.Fn lgamma "double x" 53.Ft float 54.Fn lgammaf "float x" 55.Ft double 56.Fn gamma "double x" 57.Ft float 58.Fn gammaf "float x" | 45.Sh LIBRARY 46.Lb libm 47.Sh SYNOPSIS 48.In math.h 49.Ft extern int 50.Fa signgam ; 51.sp 52.Ft double 53.Fn lgamma "double x" 54.Ft float 55.Fn lgammaf "float x" 56.Ft double 57.Fn gamma "double x" 58.Ft float 59.Fn gammaf "float x" |
60.Ft double 61.Fn tgamma "double x" |
|
59.Sh DESCRIPTION 60.Fn lgamma x 61and 62.Fn lgammaf x 63.if t \{\ 64return ln\||\(*G(x)| where 65.Bd -unfilled -offset indent 66\(*G(x) = \(is\d\s8\z0\s10\u\u\s8\(if\s10\d t\u\s8x\-1\s10\d e\u\s8\-t\s10\d dt for x > 0 and --- 11 unchanged lines hidden (view full) --- 78.Fn gamma 79and 80.Fn gammaf 81are deprecated aliases for 82.Fn lgamma 83and 84.Fn lgammaf , 85respectively. | 62.Sh DESCRIPTION 63.Fn lgamma x 64and 65.Fn lgammaf x 66.if t \{\ 67return ln\||\(*G(x)| where 68.Bd -unfilled -offset indent 69\(*G(x) = \(is\d\s8\z0\s10\u\u\s8\(if\s10\d t\u\s8x\-1\s10\d e\u\s8\-t\s10\d dt for x > 0 and --- 11 unchanged lines hidden (view full) --- 81.Fn gamma 82and 83.Fn gammaf 84are deprecated aliases for 85.Fn lgamma 86and 87.Fn lgammaf , 88respectively. |
89.Fn tgamma x 90returns \(*G(x), with no effect on 91.Fa signgam . |
|
86.Sh IDIOSYNCRASIES 87Do not use the expression 88.Dq Li signgam\(**exp(lgamma(x)) 89to compute g := \(*G(x). 90Instead use a program like this (in C): 91.Bd -literal -offset indent 92lg = lgamma(x); g = signgam\(**exp(lg); 93.Ed 94.Pp 95Only after 96.Fn lgamma 97or 98.Fn lgammaf 99has returned can signgam be correct. | 92.Sh IDIOSYNCRASIES 93Do not use the expression 94.Dq Li signgam\(**exp(lgamma(x)) 95to compute g := \(*G(x). 96Instead use a program like this (in C): 97.Bd -literal -offset indent 98lg = lgamma(x); g = signgam\(**exp(lg); 99.Ed 100.Pp 101Only after 102.Fn lgamma 103or 104.Fn lgammaf 105has returned can signgam be correct. |
100.\".Pp 101.\"For arguments in its range, 102.\".Fn gamma 103.\"is preferred, as for positive arguments 104.\"it is accurate to within one unit in the last place. 105.\"Exponentiation of 106.\".Fn lgamma 107.\"will lose up to 10 significant bits. | 106.Pp 107For arguments in its range, 108.Fn tgamma 109is preferred, as for positive arguments 110it is accurate to within one unit in the last place. 111Exponentiation of 112.Fn lgamma 113will lose up to 10 significant bits. |
108.Sh RETURN VALUES 109.Fn gamma , 110.Fn gammaf , 111.Fn lgamma , 112and 113.Fn lgammaf 114return appropriate values unless an argument is out of range. 115Overflow will occur for sufficiently large positive values, and 116non-positive integers. 117On the 118.Tn VAX , 119the reserved operator is returned, 120and 121.Va errno 122is set to 123.Er ERANGE . | 114.Sh RETURN VALUES 115.Fn gamma , 116.Fn gammaf , 117.Fn lgamma , 118and 119.Fn lgammaf 120return appropriate values unless an argument is out of range. 121Overflow will occur for sufficiently large positive values, and 122non-positive integers. 123On the 124.Tn VAX , 125the reserved operator is returned, 126and 127.Va errno 128is set to 129.Er ERANGE . |
124\."For large non-integer negative values, 125\.".Fn gamma 126\."will underflow. | 130For large non-integer negative values, 131.Fn tgamma 132will underflow. |
127.Sh SEE ALSO 128.Xr math 3 | 133.Sh SEE ALSO 134.Xr math 3 |
135.Sh STANDARDS 136The 137.Fn lgamma 138and 139.Fn tgamma 140functions are expected to conform to 141.St -isoC-99 . |
|
129.Sh HISTORY 130The 131.Fn lgamma 132function appeared in 133.Bx 4.3 . 134The 135.Fn gamma 136function appeared in --- 4 unchanged lines hidden (view full) --- 141The name 142.Fn gamma 143was originally dedicated to the 144.Fn lgamma 145function, 146and that usage was restored by switching to Sun's fdlibm in 147.Fx 1.1.5 . 148The | 142.Sh HISTORY 143The 144.Fn lgamma 145function appeared in 146.Bx 4.3 . 147The 148.Fn gamma 149function appeared in --- 4 unchanged lines hidden (view full) --- 154The name 155.Fn gamma 156was originally dedicated to the 157.Fn lgamma 158function, 159and that usage was restored by switching to Sun's fdlibm in 160.Fx 1.1.5 . 161The |
149.St -isoC-99 150standard specifies a function | |
151.Fn tgamma | 162.Fn tgamma |
152for computing \(*G(x). 153This function is currently unimplemented in this library. | 163function appeared in 164.Fx 5.0 . |