@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version : Python 3.7\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"POT-Creation-Date : 2018-06-26 18:54+0800\n "
11
- "PO-Revision-Date : 2018-10-16 16:15 +0800\n "
11
+ "PO-Revision-Date : 2018-11-07 16:57 +0800\n "
12
12
"Last-Translator : Liang-Bo Wang <me@liang2.tw>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -105,6 +105,10 @@ msgid ""
105
105
"fraction is ``3602879701896397 / 2 ** 55`` which is close to but not exactly "
106
106
"equal to the true value of 1/10."
107
107
msgstr ""
108
+ "只要您停在任何有限的位數,您就只會得到近似值。而現在大多數的計算機中,浮點數"
109
+ "是透過二進位分數近似的,其中分子從最高有效位元使開始用 53 個位元表示,分母則"
110
+ "是以二為底的指數。在 1/10 的例子中,二進位分數為 ``3602879701896397 / 2 ** "
111
+ "55``,而這樣的表示十分地接近,但不完全等同於 1/10 的真正數值。"
108
112
109
113
#: ../../tutorial/floatingpoint.rst:62
110
114
msgid ""
@@ -114,18 +118,30 @@ msgid ""
114
118
"if Python were to print the true decimal value of the binary approximation "
115
119
"stored for 0.1, it would have to display ::"
116
120
msgstr ""
121
+ "由於數值顯示的方式,很多使用者並沒有發現數值是個近似值。Python 只會印出一個十"
122
+ "進位近似值,其近似了儲存在計算機中的二進位近似值的十進位數值。在大多數的計算"
123
+ "機中,如果 Python 真的會印出完整的十進位數值,其表示儲存在計算機中的 0.1 的二"
124
+ "進位近似值,它將顯示為:\n"
125
+ "\n"
126
+ "::"
117
127
118
128
#: ../../tutorial/floatingpoint.rst:71
119
129
msgid ""
120
130
"That is more digits than most people find useful, so Python keeps the number "
121
131
"of digits manageable by displaying a rounded value instead ::"
122
132
msgstr ""
133
+ "這比一般人感到有用的位數還多,所以 Python 將位數保持在可以接受的範圍,只顯示"
134
+ "捨入後的數值:\n"
135
+ "\n"
136
+ "::"
123
137
124
138
#: ../../tutorial/floatingpoint.rst:77
125
139
msgid ""
126
140
"Just remember, even though the printed result looks like the exact value of "
127
141
"1/10, the actual stored value is the nearest representable binary fraction."
128
142
msgstr ""
143
+ "一定要記住,雖然印出的數字看起來是精準的 1/10,但真正儲存的數值是能表示的二進"
144
+ "位分數中,最接近精準數值的數。"
129
145
130
146
#: ../../tutorial/floatingpoint.rst:80
131
147
msgid ""
@@ -137,6 +153,11 @@ msgid ""
137
153
"values share the same approximation, any one of them could be displayed "
138
154
"while still preserving the invariant ``eval(repr(x)) == x``."
139
155
msgstr ""
156
+ "有趣的是,有許多不同的十進位數,共用同一個最接近的二進位近似小數。例如說:數"
157
+ "字 ``0.1`` 和 ``0.10000000000000001`` 和 "
158
+ "``0.1000000000000000055511151231257827021181583404541015625``,都由 "
159
+ "``3602879701896397 / 2 ** 55`` 近似。由於這三個數值共用同一個近似值,任何一個"
160
+ "數值都可以被顯示,同時保持 ``eval(repr(x)) == x``。"
140
161
141
162
#: ../../tutorial/floatingpoint.rst:88
142
163
msgid ""
@@ -145,6 +166,9 @@ msgid ""
145
166
"Starting with Python 3.1, Python (on most systems) is now able to choose the "
146
167
"shortest of these and simply display ``0.1``."
147
168
msgstr ""
169
+ "歷史上,Python 的提示字元 (prompt) 與內建的 :func:`repr` 函式會選擇上段說明中"
170
+ "有 17 個有效位元的數:``0.10000000000000001``。從 Python 3.1 版開始,"
171
+ "Python(在大部分的系統上)可以選擇其中最短的數並簡單地顯示為 ``0.1``。"
148
172
149
173
#: ../../tutorial/floatingpoint.rst:93
150
174
msgid ""
@@ -154,12 +178,19 @@ msgid ""
154
178
"arithmetic (although some languages may not *display* the difference by "
155
179
"default, or in all output modes)."
156
180
msgstr ""
181
+ "注意,這是二進位浮點數理所當然的特性,並不是 Python 的錯誤 (bug),更不是您程"
182
+ "式碼的錯誤。只要有程式語言支持硬體的浮點數運算,您將會看到同樣的事情出現在其"
183
+ "中(雖然某些程式語言預設不\\ *顯示*\\ 差異,或者預設全部輸出)。"
157
184
158
185
#: ../../tutorial/floatingpoint.rst:99
159
186
msgid ""
160
187
"For more pleasant output, you may wish to use string formatting to produce a "
161
188
"limited number of significant digits::"
162
189
msgstr ""
190
+ "為求更優雅的輸出,您可能想要使用字串的格式化 (string formatting) 產生限定的有"
191
+ "效位數:\n"
192
+ "\n"
193
+ "::"
163
194
164
195
#: ../../tutorial/floatingpoint.rst:111
165
196
msgid ""
0 commit comments