[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Nov 24 22:12:28 CET 2011


details:   /var/hg/gmp/rev/6a34a9ea04b7
changeset: 14476:6a34a9ea04b7
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Nov 24 22:05:28 2011 +0100
description:
(Formatted Output Strings): Clarify rules for mpf_t precision.

details:   /var/hg/gmp/rev/da32b78d3376
changeset: 14477:da32b78d3376
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Nov 24 22:11:22 2011 +0100
description:
*** empty log message ***

diffstat:

 ChangeLog    |  3 +++
 doc/gmp.texi |  7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r dd533e46ca69 -r da32b78d3376 ChangeLog
--- a/ChangeLog	Thu Nov 24 12:41:46 2011 +0100
+++ b/ChangeLog	Thu Nov 24 22:11:22 2011 +0100
@@ -1,5 +1,8 @@
 2011-11-24  Torbjorn Granlund  <tege at gmplib.org>
 
+	* doc/gmp.texi (Formatted Output Strings): Clarify rules for mpf_t
+	precision.
+
 	* mpn/powerpc32/p7/gmp-mparam.h: New file.
 
 	* tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Up min_size to karatsuba's
diff -r dd533e46ca69 -r da32b78d3376 doc/gmp.texi
--- a/doc/gmp.texi	Thu Nov 24 12:41:46 2011 +0100
+++ b/doc/gmp.texi	Thu Nov 24 22:11:22 2011 +0100
@@ -5909,7 +5909,7 @@
 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 @@
 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


More information about the gmp-commit mailing list