summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index e54faae..f5ff69e 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1095,6 +1095,14 @@ available. They are listed here in alphabetical order.
example, ``round(0.5)`` is ``1.0`` and ``round(-0.5)`` is ``-1.0``).
+ .. note::
+
+ The behavior of :func:`round` for floats can be surprising: for example,
+ ``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``.
+ This is not a bug: it's a result of the fact that most decimal fractions
+ can't be represented exactly as a float. See :ref:`tut-fp-issues` for
+ more information.
+
.. function:: set([iterable])
:noindex: