@@ -10,6 +10,7 @@ msgstr ""
1010"Report-Msgid-Bugs-To : \n "
1111"POT-Creation-Date : 2018-06-30 05:56+0900\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13+ "
Last-Translator :
ww song <[email protected] >, 2018\n "
1314"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1415"MIME-Version : 1.0\n "
1516"Content-Type : text/plain; charset=UTF-8\n "
@@ -19,57 +20,58 @@ msgstr ""
1920
2021#: ../../tutorial/floatingpoint.rst:9
2122msgid "Floating Point Arithmetic: Issues and Limitations"
22- msgstr ""
23+ msgstr "浮点算术:争议和限制 "
2324
2425#: ../../tutorial/floatingpoint.rst:14
2526msgid ""
2627"Floating-point numbers are represented in computer hardware as base 2 "
2728"(binary) fractions. For example, the decimal fraction ::"
28- msgstr ""
29+ msgstr "浮点数在计算机硬件中以二进制分数表示。举例而言,十进制分数 :: "
2930
3031#: ../../tutorial/floatingpoint.rst:19
3132msgid ""
3233"has value 1/10 + 2/100 + 5/1000, and in the same way the binary fraction ::"
33- msgstr ""
34+ msgstr "等于 1/10 + 2/100 + 5/1000 ,同理,二进制分数 :: "
3435
3536#: ../../tutorial/floatingpoint.rst:23
3637msgid ""
3738"has value 0/2 + 0/4 + 1/8. These two fractions have identical values, the "
3839"only real difference being that the first is written in base 10 fractional "
3940"notation, and the second in base 2."
40- msgstr ""
41+ msgstr "等于0/2 + 0/4 + 1/8。这两个分数的值相同,唯一真正的区别是第一个用十进制表示法写入,第二个用二进制表示。 "
4142
4243#: ../../tutorial/floatingpoint.rst:27
4344msgid ""
4445"Unfortunately, most decimal fractions cannot be represented exactly as "
4546"binary fractions. A consequence is that, in general, the decimal floating-"
4647"point numbers you enter are only approximated by the binary floating-point "
4748"numbers actually stored in the machine."
48- msgstr ""
49+ msgstr "不幸的是,大多数的十进制数都不能完全表示为二进制分数。这导致,大多数情况下,你输入的十进制浮点数都只能近似地以二进制浮点数储存在计算机中。 "
4950
5051#: ../../tutorial/floatingpoint.rst:32
5152msgid ""
5253"The problem is easier to understand at first in base 10. Consider the "
5354"fraction 1/3. You can approximate that as a base 10 fraction::"
54- msgstr ""
55+ msgstr "用十进制来理解这个问题显得更加容易一些。考虑分数 1/3 。我们可以得到它在十进制下的一个近似值 :: "
5556
5657#: ../../tutorial/floatingpoint.rst:37 ../../tutorial/floatingpoint.rst:41
5758msgid "or, better, ::"
58- msgstr ""
59+ msgstr "或者,更近似的,:: "
5960
6061#: ../../tutorial/floatingpoint.rst:45
6162msgid ""
6263"and so on. No matter how many digits you're willing to write down, the "
6364"result will never be exactly 1/3, but will be an increasingly better "
6465"approximation of 1/3."
65- msgstr ""
66+ msgstr "以此类推。结果是无论你写下多少的数字,它都永远不会等于 1/3 ,只是更加更加地接近 1/3 。 "
6667
6768#: ../../tutorial/floatingpoint.rst:49
6869msgid ""
6970"In the same way, no matter how many base 2 digits you're willing to use, the"
7071" decimal value 0.1 cannot be represented exactly as a base 2 fraction. In "
7172"base 2, 1/10 is the infinitely repeating fraction ::"
7273msgstr ""
74+ "同样的道理,无论你写下多少的二进制数字,十进制分数 0.1 都无法恰好表示为一个二进制分数。在二进制下, 1/10 是一个无限循环小数 ::"
7375
7476#: ../../tutorial/floatingpoint.rst:55
7577msgid ""
@@ -80,6 +82,9 @@ msgid ""
8082"fraction is ``3602879701896397 / 2 ** 55`` which is close to but not exactly"
8183" equal to the true value of 1/10."
8284msgstr ""
85+ "在任何一个位置停下,你都只能得到一个近似值。因此,在今天的大部分架构上,浮点数都只能近似地使用二进制分数表达,分子使用每 8 字节的前 53 "
86+ "位表示,分母则表示为 2 的幂次。在 1/10 这个例子中,相应的二进制分数是 ``3602879701896397 / 2 ** 55`` ,它很接近"
87+ " 1/10 ,但并不是 1/10 。"
8388
8489#: ../../tutorial/floatingpoint.rst:62
8590msgid ""
@@ -89,18 +94,20 @@ msgid ""
8994"if Python were to print the true decimal value of the binary approximation "
9095"stored for 0.1, it would have to display ::"
9196msgstr ""
97+ "大部分用户都不会意识到这个差异的存在,因为 Python 只会打印计算机中存储的二进制值的十进制近似值。在大部分计算机中,如果 Python 想把 "
98+ "0.1 的二进制对应的精确十进制打印出来,将会变成这样 ::"
9299
93100#: ../../tutorial/floatingpoint.rst:71
94101msgid ""
95102"That is more digits than most people find useful, so Python keeps the number"
96103" of digits manageable by displaying a rounded value instead ::"
97- msgstr ""
104+ msgstr "这比大多数人认为有用的数字更多,因此Python通过显示舍入值来保持可管理的位数 :: "
98105
99106#: ../../tutorial/floatingpoint.rst:77
100107msgid ""
101108"Just remember, even though the printed result looks like the exact value of "
102109"1/10, the actual stored value is the nearest representable binary fraction."
103- msgstr ""
110+ msgstr "牢记,即使输出的结果看起来好像就是 1/10 的精确值,实际储存的值只是最接近 1/10 的计算机可表示的二进制分数。 "
104111
105112#: ../../tutorial/floatingpoint.rst:80
106113msgid ""
0 commit comments