- gamma_r, lgamma_r, gammaf_r, and lgammaf_r were protected by _REENTRANT

in math.h; the consensus here was that __BSD_VISIBLE was correct instead.

- gamma_r, lgamma_r, gammaf_r, and lgammaf_r had no documentation in the
  lgamma(3) manpage.

Reviewed by: standards@
Submitted by: Ben Mesander
This commit is contained in:
imp 2003-02-26 13:12:03 +00:00
parent 908502aa49
commit b3a39bc5da
2 changed files with 38 additions and 9 deletions

View File

@ -37,9 +37,13 @@
.Os
.Sh NAME
.Nm lgamma ,
.Nm lgamma_r ,
.Nm lgammaf ,
.Nm lgammaf_r ,
.Nm gamma ,
.Nm gamma_r ,
.Nm gammaf ,
.Nm gammaf_r ,
.Nm tgamma
.Nd log gamma functions, gamma function
.Sh LIBRARY
@ -51,12 +55,20 @@
.sp
.Ft double
.Fn lgamma "double x"
.Ft double
.Fn lgamma_r "double x, int *signgamp"
.Ft float
.Fn lgammaf "float x"
.Ft float
.Fn lgammaf_r "float x, int *signgamp"
.Ft double
.Fn gamma "double x"
.Ft double
.Fn gamma_r "double x, int *signgamp"
.Ft float
.Fn gammaf "float x"
.Ft float
.Fn gammaf_r "float x, int *signgamp"
.Ft double
.Fn tgamma "double x"
.Sh DESCRIPTION
@ -78,13 +90,26 @@ The external integer
.Fa signgam
returns the sign of \(*G(x).
.Pp
.Fn gamma
.Fn lgamma_r x signgamp
and
.Fn gammaf
.Fn lgammaf_r x signgamp
provide the same functionality as
.Fn lgamma x
and
.Fn lgammaf x
but the caller must provide an integer to store the sign of \(*G(x)
.Pp
.Fn gamma ,
.Fn gammaf ,
.Fn gamma_r ,
and
.Fn gammaf_r
are deprecated aliases for
.Fn lgamma
and
.Fn lgamma ,
.Fn lgammaf ,
.Fn lgamma_r ,
and
.Fn lgammaf_r ,
respectively.
.Fn tgamma x
returns \(*G(x), with no effect on
@ -113,10 +138,14 @@ Exponentiation of
will lose up to 10 significant bits.
.Sh RETURN VALUES
.Fn gamma ,
.Fn gamma_r,
.Fn gammaf ,
.Fn gammaf_r ,
.Fn lgamma ,
.Fn lgamma_r ,
.Fn lgammaf,
and
.Fn lgammaf
.Fn lgammaf_r
return appropriate values unless an argument is out of range.
Overflow will occur for sufficiently large positive values, and
non-positive integers.

View File

@ -249,10 +249,10 @@ double log1p(double) __pure2;
* Reentrant version of gamma & lgamma; passes signgam back by reference
* as the second argument; user must allocate space for signgam.
*/
#ifdef _REENTRANT
#ifdef __BSD_VISIBLE
double gamma_r(double, int *);
double lgamma_r(double, int *);
#endif /* _REENTRANT */
#endif /* __BSD_VISIBLE */
/* float versions of ANSI/POSIX functions */
float acosf(float);
@ -330,10 +330,10 @@ float log1pf(float) __pure2;
* signgam back by reference as the second argument; user must
* allocate space for signgam.
*/
#ifdef _REENTRANT
#ifdef __BSD_VISIBLE
float gammaf_r(float, int *);
float lgammaf_r(float, int *);
#endif /* _REENTRANT */
#endif /* __BSD_VISIBLE */
#endif /* !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */