aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-10-29 15:56:29 +0000
committerAndreas Jaeger <aj@suse.de>2001-10-29 15:56:29 +0000
commit776e8492c97c89888484cc1287f7fc7e3217b5ad (patch)
tree6249f7c84eabae21703c6eed244a1db737b527aa /manual
parentd3b82fcc5f62ca7f0e462a0765689c368dfc6b90 (diff)
downloadglibc-776e8492c97c89888484cc1287f7fc7e3217b5ad.zip
glibc-776e8492c97c89888484cc1287f7fc7e3217b5ad.tar.gz
glibc-776e8492c97c89888484cc1287f7fc7e3217b5ad.tar.bz2
* stdio.texi (Integer Conversions): Corrections to sample printf
output, clarify `#' behaviour on 0. (Floating-Point Conversions): Clarify that %g only uses %e when the exponent would be greater than 1.
Diffstat (limited to 'manual')
-rw-r--r--manual/stdio.texi12
1 files changed, 6 insertions, 6 deletions
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 40f73f4..ce27805 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -1940,7 +1940,7 @@ conversion gives results like:
| 0|0 | +0|+0 | 0|00000| | 00|0|
| 1|1 | +1|+1 | 1|00001| 1| 01|1|
| -1|-1 | -1|-1 | -1|-0001| -1| -01|-1|
-|100000|100000|+100000| 100000|100000|100000|100000|100000|
+|100000|100000|+100000|+100000| 100000|100000|100000|100000|100000|
@end smallexample
In particular, notice what happens in the last case where the number
@@ -1954,7 +1954,7 @@ various format options, using the template string:
@end smallexample
@smallexample
-| 0| 0| 0| 0| 0| 0x0| 0X0|0x00000000|
+| 0| 0| 0| 0| 0| 0| 0| 00000000|
| 1| 1| 1| 1| 01| 0x1| 0X1|0x00000001|
|100000|303240|186a0|186A0|0303240|0x186a0|0X186A0|0x000186a0|
@end smallexample
@@ -1983,10 +1983,10 @@ the precision. The exponent always contains at least two digits. The
The @samp{%g} and @samp{%G} conversions print the argument in the style
of @samp{%e} or @samp{%E} (respectively) if the exponent would be less
-than -4 or greater than or equal to the precision; otherwise they use the
-@samp{%f} style. Trailing zeros are removed from the fractional portion
-of the result and a decimal-point character appears only if it is
-followed by a digit.
+than -4 or greater than or equal to the precision; otherwise they use
+the @samp{%f} style. A precision of @code{0}, is taken as 1. is
+Trailing zeros are removed from the fractional portion of the result and
+a decimal-point character appears only if it is followed by a digit.
The @samp{%a} and @samp{%A} conversions are meant for representing
floating-point numbers exactly in textual form so that they can be