about summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rw-r--r--manual/math.texi29
-rw-r--r--manual/stdio.texi38
2 files changed, 61 insertions, 6 deletions
diff --git a/manual/math.texi b/manual/math.texi
index 4386c2fefc..e1d597d06a 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -857,7 +857,8 @@ The sign of the gamma function is stored in the global variable
 the intermediate result was positive or zero, and, @code{-1} if it was
 negative.
 
-You can compute the actual gamma function as follows:
+To compute the real gamma function you can use the @code{tgamma}
+function or you can compute the values as follows:
 @smallexample
 lgam = lgamma(x);
 gam  = signgam*exp(lgam);
@@ -878,15 +879,35 @@ the intermediate result in the variable pointed to by @var{signp}
 instead of in the @var{signgam} global.
 @end deftypefun
 
-@ignore
 @comment math.h
 @comment SVID
 @deftypefun double gamma (double @var{x})
 @deftypefunx float gammaf (float @var{x})
 @deftypefunx {long double} gammal (long double @var{x})
-??? _not_ exp(lgamma())*signgam - historical?
+These functions exist for compatibility reasons.  They are equivalent to
+@code{lgamma} etc.  It is better to use @code{lgamma} since for one the
+name reflect better the actual computation and @code{lgamma} is also
+standardized in @w{ISO C 9x} while @code{gamma} is not.
+@end deftypefun
+
+@comment math.h
+@comment XPG
+@deftypefun double tgamma (double @var{x})
+@deftypefunx float tgammaf (float @var{x})
+@deftypefunx {long double} tgammal (long double @var{x})
+@code{tgamma} applies the gamma function to @var{x}.  The gamma
+function is defined as
+@tex
+$$\Gamma(x) = \int_0^\infty t^{x-1} e^{-t} \hbox{d}t$$
+@end tex
+@ifnottex
+@smallexample
+gamma (x) = integral from 0 to @infinity{} of t^(x-1) e^-t dt
+@end smallexample
+@end ifnottex
+
+This function was introduced in @w{ISO C 9x}.
 @end deftypefun
-@end ignore
 
 @comment math.h
 @comment SVID
diff --git a/manual/stdio.texi b/manual/stdio.texi
index c930471220..531717c81f 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -1190,6 +1190,8 @@ char}, as appropriate.  A @code{char} argument is converted to an
 anyway, but the @samp{h} modifier says to convert it back to a
 @code{char} again.
 
+This modifier was introduced in @w{ISO C 9x}.
+
 @item h
 Specifies that the argument is a @code{short int} or @code{unsigned
 short int}, as appropriate.  A @code{short} argument is converted to an
@@ -1197,6 +1199,12 @@ short int}, as appropriate.  A @code{short} argument is converted to an
 anyway, but the @samp{h} modifier says to convert it back to a
 @code{short} again.
 
+@item j
+Specifies that the argument is a @code{intmax_t} or @code{uintmax_t}, as
+appropriate.
+
+This modifier was introduced in @w{ISO C 9x}.
+
 @item l
 Specifies that the argument is a @code{long int} or @code{unsigned long
 int}, as appropriate.  Two @samp{l} characters is like the @samp{L}
@@ -1213,8 +1221,17 @@ The @samp{q} modifier is another name for the same thing, which comes
 from 4.4 BSD; a @w{@code{long long int}} is sometimes called a ``quad''
 @code{int}.
 
-@item Z
-Specifies that the argument is a @code{size_t}.  This is a GNU extension.
+@item t
+Specifies that the argument is a @code{ptrdiff_t}.
+
+This modifier was introduced in @w{ISO C 9x}.
+
+@item z
+@itemx Z
+Specifies that the argument is a @code{size_t}.
+
+@samp{z} was introduced in @w{ISO C 9x}.  @samp{Z} is a GNU extension
+predating this addition and should not be used anymore in new code.
 @end table
 
 Here is an example.  Using the template string:
@@ -2653,10 +2670,17 @@ specify other sizes of integer:
 Specifies that the argument is a @code{signed char *} or @code{unsigned
 char *}.
 
+This modifier was introduced in @w{ISO C 9x}.
+
 @item h
 Specifies that the argument is a @code{short int *} or @code{unsigned
 short int *}.
 
+@item j
+Specifies that the argument is a @code{intmax_t *} or @code{uintmax_t *}.
+
+This modifier was introduced in @w{ISO C 9x}.
+
 @item l
 Specifies that the argument is a @code{long int *} or @code{unsigned
 long int *}.  Two @samp{l} characters is like the @samp{L} modifier, below.
@@ -2672,6 +2696,16 @@ is the same as @code{long int}.)
 The @samp{q} modifier is another name for the same thing, which comes
 from 4.4 BSD; a @w{@code{long long int}} is sometimes called a ``quad''
 @code{int}.
+
+@item t
+Specifies that the argument is a @code{ptrdiff_t *}.
+
+This modifier was introduced in @w{ISO C 9x}.
+
+@item z
+Specifies that the argument is a @code{size_t *}.
+
+This modifier was introduced in @w{ISO C 9x}.
 @end table
 
 All of the @samp{%e}, @samp{%f}, @samp{%g}, @samp{%E}, and @samp{%G}