summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2022-02-06 12:44:04 (GMT)
committerGitHub <noreply@github.com>2022-02-06 12:44:04 (GMT)
commitfa90e48c53384889d28f171170ab79d777d46949 (patch)
tree4ed1435d5910c3213f234a97c5cc6e81691736fb /Doc/tutorial
parent54842e4311bb0e34012d1984b42eab41eeeaea6a (diff)
downloadcpython-fa90e48c53384889d28f171170ab79d777d46949.zip
cpython-fa90e48c53384889d28f171170ab79d777d46949.tar.gz
cpython-fa90e48c53384889d28f171170ab79d777d46949.tar.bz2
[doc] Enhance readability by avoiding big blocks for small numbers. (GH-31157)
Initially reported by Gregory Jacob on the docs@ mailing list: https://mail.python.org/archives/list/docs@python.org/thread/VPSFGLOZOHSPF7TGPOI65AOH25TCPSVR/
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/floatingpoint.rst12
1 files changed, 3 insertions, 9 deletions
diff --git a/Doc/tutorial/floatingpoint.rst b/Doc/tutorial/floatingpoint.rst
index 7212b40..e1cd7f9 100644
--- a/Doc/tutorial/floatingpoint.rst
+++ b/Doc/tutorial/floatingpoint.rst
@@ -12,15 +12,9 @@ Floating Point Arithmetic: Issues and Limitations
Floating-point numbers are represented in computer hardware as base 2 (binary)
-fractions. For example, the decimal fraction ::
-
- 0.125
-
-has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction ::
-
- 0.001
-
-has value 0/2 + 0/4 + 1/8. These two fractions have identical values, the only
+fractions. For example, the **decimal** fraction ``0.125``
+has value 1/10 + 2/100 + 5/1000, and in the same way the **binary** fraction ``0.001``
+has value 0/2 + 0/4 + 1/8. These two fractions have identical values, the only
real difference being that the first is written in base 10 fractional notation,
and the second in base 2.