summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/string.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 9e8e44a..a000bb4 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -589,6 +589,11 @@ The available presentation types for :class:`float` and
| | as altered by the other format modifiers. |
+---------+----------------------------------------------------------+
+The result should be correctly rounded to a given precision ``p`` of digits
+after the decimal point. The rounding mode for :class:`float` matches that
+of the :func:`round` builtin. For :class:`~decimal.Decimal`, the rounding
+mode of the current :ref:`context <decimal-context>` will be used.
+
The available presentation types for :class:`complex` are the same as those for
:class:`float` (``'%'`` is not allowed). Both the real and imaginary components
of a complex number are formatted as floating-point numbers, according to the