summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2011-11-24 22:05:28 +0100
committerTorbjorn Granlund <tege@gmplib.org>2011-11-24 22:05:28 +0100
commitcbc96e61b041e6ff713adf3885c610fdefa2023f (patch)
tree0d96dfa979b3384150536274f6d5fd709dd4c05d
parent5c345ce60c939a92a920e984d36b4d4d52d4bae9 (diff)
downloadgmp-cbc96e61b041e6ff713adf3885c610fdefa2023f.tar.gz
(Formatted Output Strings): Clarify rules for mpf_t precision.
-rw-r--r--doc/gmp.texi7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi
index 1d6538165..9e77abe7f 100644
--- a/doc/gmp.texi
+++ b/doc/gmp.texi
@@ -5909,7 +5909,7 @@ instance extensions registered with GLIBC @code{register_printf_function}.
Also currently there's no support for POSIX @samp{$} style numbered arguments
(perhaps this will be added in the future).
-The precision field has it's usual meaning for integer @samp{Z} and float
+The precision field has its usual meaning for integer @samp{Z} and float
@samp{F} types, but is currently undefined for @samp{Q} and should not be used
with that.
@@ -5920,7 +5920,10 @@ happens even for an @samp{f} conversion of an @code{mpf_t} which is an
integer, for instance @math{2^@W{1024}} in an @code{mpf_t} of 128 bits
precision will only produce about 40 digits, then pad with zeros to the
decimal point. An empty precision field like @samp{%.Fe} or @samp{%.Ff} can
-be used to specifically request just the significant digits.
+be used to specifically request just the significant digits. Without any dot
+and thus no precision field, a precision value of 6 will be used. Note that
+these rules mean that @samp{%Ff}, @samp{%.Ff}, and @samp{%.0Ff} will all be
+different.
The decimal point character (or string) is taken from the current locale
settings on systems which provide @code{localeconv} (@pxref{Locales,, Locales