Thread (1 message) 1 message, 1 author, 2021-05-16

Re: [PATCH] gamma.3: Add reentrant functions

From: Alejandro Colomar <hidden>
Date: 2021-05-16 19:53:27

Hi Walter,

Thanks for documenting this.  However, please see some comments below.

Regards,

Alex


BTW, could you please ping me about anything that we have pending from
you?  Thanks!

On 5/15/21 10:05 PM, Radisson97@gmx.de wrote:
From f91e8087a394e32fe8d7bffd3ceff7af0c05baa3 Mon Sep 17 00:00:00 2001
From: Harms <redacted>
Date: Sat, 15 May 2021 21:28:26 +0200
Subject: [PATCH] Add reentrant functions for gamma.3
Please use the following format for commit subject:

page.3, anotherpage.3: msg

See the subject I used for this email.
quoted hunk
Add reentrant functions for gamma.3
Signed-off-by: Harms <redacted>
---
 man3/gamma.3 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/man3/gamma.3 b/man3/gamma.3
index 003964158..b0e0a68c5 100644
--- a/man3/gamma.3
+++ b/man3/gamma.3
@@ -8,7 +8,7 @@
 .\"
 .TH GAMMA 3 2021-03-22 "GNU" "Linux Programmer's Manual"
 .SH NAME
-gamma, gammaf, gammal \- (logarithm of the) gamma function
+gamma, gammaf, gammal,gamma_r, gammaf_r, gammal_r \- (logarithm of the) gamma function
s/,g/, g/

Also, please break the line, so that it fits in an 80-col screen:

s/ \\-/\n\\-/
quoted hunk
 .SH SYNOPSIS
 .nf
 .B #include <math.h>
@@ -16,6 +16,9 @@ gamma, gammaf, gammal \- (logarithm of the) gamma function
 .BI "double gamma(double " x ");"
 .BI "float gammaf(float " x ");"
 .BI "long double gammal(long double " x ");"
+.BI "double gamma_r (double " x ", int *" sig ");"
Could you please use the same syntax of other similar pages (I've seen
that you could mostly copy lgamma.3), to maintain some consistency, and
only differ from them when needed.  However, if you think the other
pages could be improved, then go ahead and propose a very different
syntax, noting that we could probably improve the others too.

Also, don't add unnecessary quoting ("):

s/");"/);/

Please fix the old ones (non-_r) too :)
quoted hunk
+.BI "float gammaf_r(float " x ", int *" sig ");"
+.BI "long double gammal_r(long double " x ", int *" sig ");"
 .fi
 .PP
 Link with \fI\-lm\fP.
@@ -45,6 +48,11 @@ These functions are deprecated: instead, use either the
 or the
 .BR lgamma (3)
 functions, as appropriate.
+ .PP
+The functions with the "_r" suffix are the reentrant version
+of the corosponding function. The sign of the intermediate result
+is stored in the the variable pointed to by
+.IR sig .
See comment above.
 .PP
 For the definition of the Gamma function, see
 .BR tgamma (3).
--
2.26.2
-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help