From 72c8365c2012369f8e1d8496fc4650b756266868 Mon Sep 17 00:00:00 2001 From: kleink Date: Mon, 16 Aug 1999 12:35:18 +0000 Subject: [PATCH] Document reentrant log gamma interfaces. --- lib/libm/Makefile | 6 ++++-- lib/libm/man/lgamma.3 | 25 +++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 46a65b2ae505..32b49950e22f 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.47 1999/08/15 22:23:53 kleink Exp $ +# $NetBSD: Makefile,v 1.48 1999/08/16 12:35:18 kleink Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -174,7 +174,9 @@ MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3 MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3 MLINKS+=j0.3 j0f.3 j0.3 j1.3 j0.3 j1f.3 j0.3 jn.3 j0.3 jnf.3 \ j0.3 y0.3 j0.3 y0f.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 j0.3 ynf.3 -MLINKS+=lgamma.3 lgammaf.3 lgamma.3 gamma.3 lgamma.3 gammaf.3 +MLINKS+=lgamma.3 lgammaf.3 lgamma.3 lgamma_r.3 lgamma.3 lgammaf_r.3 \ + lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 gamma_r.3 \ + lgamma.3 gammaf_r.3 MLINKS+=rint.3 rintf.3 MLINKS+=sin.3 sinf.3 MLINKS+=sinf.3 sinhf.3 diff --git a/lib/libm/man/lgamma.3 b/lib/libm/man/lgamma.3 index 1301f286acdd..8d19f2ed77bc 100644 --- a/lib/libm/man/lgamma.3 +++ b/lib/libm/man/lgamma.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92 -.\" $NetBSD: lgamma.3,v 1.16 1999/08/15 22:23:54 kleink Exp $ +.\" $NetBSD: lgamma.3,v 1.17 1999/08/16 12:35:18 kleink Exp $ .\" .Dd December 3, 1992 .Dt LGAMMA 3 @@ -38,8 +38,12 @@ .Sh NAME .Nm lgamma , .Nm lgammaf , +.Nm lgamma_r , +.Nm lgammaf_r , .Nm gamma , -.Nm gammaf +.Nm gammaf , +.Nm gamma_r , +.Nm gammaf_r .Nd log gamma function .Sh LIBRARY .Lb libm @@ -53,9 +57,17 @@ .Ft float .Fn lgammaf "float x" .Ft double +.Fn lgamma_r "double x" "int *sign" +.Ft float +.Fn lgammaf_r "float x" "int *sign" +.Ft double .Fn gamma "double x" .Ft float .Fn gammaf "float x" +.Ft double +.Fn gamma_r "double x" "int *sign" +.Ft float +.Fn gammaf_r "float x" "int *sign" .Sh DESCRIPTION .Fn lgamma x .if t \{\ @@ -73,6 +85,15 @@ The external integer .Fa signgam returns the sign of \(*G(x). .Pp +.Fn lgamma_r +is a reentrant interface that performs identically to +.Fn lgamma , +differing in that the sign of \(*G(x) is stored in the location +pointed to by the +.Fa sign +argument and +.Fa signgam +is not modified. .Sh IDIOSYNCRASIES Do not use the expression .Dq Li signgam\(**exp(lgamma(x))