Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9221e6

Browse files
committed
[po] auto sync bot
1 parent 11c443e commit c9221e6

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

tutorial/floatingpoint.po

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,24 @@ msgid ""
219219
"expect. :func:`str` usually suffices, and for finer control see the "
220220
":meth:`str.format` method's format specifiers in :ref:`formatstrings`."
221221
msgstr ""
222+
"虽然病态的情况确实存在,但对于大多数正常的浮点运算使用来说,你只需简单地将最终显示的结果舍入为你期望的十进制数值即可得到你期望的结果。 "
223+
":func:`str` 通常已足够,对于更精度的控制可参看 :ref:`formatstrings` 中 :meth:`str.format` "
224+
"方法的格式描述符。"
222225

223226
#: ../../tutorial/floatingpoint.rst:152
224227
msgid ""
225228
"For use cases which require exact decimal representation, try using the "
226229
":mod:`decimal` module which implements decimal arithmetic suitable for "
227230
"accounting applications and high-precision applications."
228-
msgstr ""
231+
msgstr "对于需要精确十进制表示的使用场景,请尝试使用 :mod:`decimal` 模块,该模块实现了适合会计应用和高精度应用的十进制运算。"
229232

230233
#: ../../tutorial/floatingpoint.rst:156
231234
msgid ""
232235
"Another form of exact arithmetic is supported by the :mod:`fractions` module"
233236
" which implements arithmetic based on rational numbers (so the numbers like "
234237
"1/3 can be represented exactly)."
235238
msgstr ""
239+
"另一种形式的精确运算由 :mod:`fractions` 模块提供支持,该模块实现了基于有理数的算术运算(因此可以精确表示像 1/3 这样的数值)。"
236240

237241
#: ../../tutorial/floatingpoint.rst:160
238242
msgid ""
@@ -241,6 +245,8 @@ msgid ""
241245
" statistical operations supplied by the SciPy project. See "
242246
"<https://scipy.org>."
243247
msgstr ""
248+
"如果你是浮点运算的重度用户,你应该看一下数值运算 Python 包 NumPy 以及由 SciPy 项目所提供的许多其它数学和统计运算包。 参见 "
249+
"<https://scipy.org>。"
244250

245251
#: ../../tutorial/floatingpoint.rst:164
246252
msgid ""
@@ -249,24 +255,26 @@ msgid ""
249255
":meth:`float.as_integer_ratio` method expresses the value of a float as a "
250256
"fraction::"
251257
msgstr ""
258+
"Python 也提供了一些工具,可以在你真的 *想要* 知道一个浮点数精确值的少数情况下提供帮助。 例如 "
259+
":meth:`float.as_integer_ratio` 方法会将浮点数表示为一个分数::"
252260

253261
#: ../../tutorial/floatingpoint.rst:173
254262
msgid ""
255263
"Since the ratio is exact, it can be used to losslessly recreate the original"
256264
" value::"
257-
msgstr ""
265+
msgstr "由于这是一个精确的比值,它可以被用来无损地重建原始值::"
258266

259267
#: ../../tutorial/floatingpoint.rst:179
260268
msgid ""
261269
"The :meth:`float.hex` method expresses a float in hexadecimal (base 16), "
262270
"again giving the exact value stored by your computer::"
263-
msgstr ""
271+
msgstr ":meth:`float.hex` 方法会以十六进制(以 16 为基数)来表示浮点数,同样能给出保存在你的计算机中的精确值::"
264272

265273
#: ../../tutorial/floatingpoint.rst:185
266274
msgid ""
267275
"This precise hexadecimal representation can be used to reconstruct the float"
268276
" value exactly::"
269-
msgstr ""
277+
msgstr "这种精确的十六进制表示法可被用来精确地重建浮点值::"
270278

271279
#: ../../tutorial/floatingpoint.rst:191
272280
msgid ""
@@ -275,6 +283,7 @@ msgid ""
275283
"data with other languages that support the same format (such as Java and "
276284
"C99)."
277285
msgstr ""
286+
"由于这种表示法是精确的,它适用于跨越不同版本(平台无关)的 Python 移植数值,以及与支持相同格式的其他语言(例如 Java 和 C99)交换数据."
278287

279288
#: ../../tutorial/floatingpoint.rst:195
280289
msgid ""
@@ -284,17 +293,19 @@ msgid ""
284293
" so that the errors do not accumulate to the point where they affect the "
285294
"final total:"
286295
msgstr ""
296+
"另一个有用的工具是 :func:`math.fsum` 函数,它有助于减少求和过程中的精度损失。 它会在数值被添加到总计值的时候跟踪“丢失的位”。 "
297+
"这可以很好地保持总计值的精确度, 使得错误不会积累到能影响结果总数的程度:"
287298

288299
#: ../../tutorial/floatingpoint.rst:209
289300
msgid "Representation Error"
290-
msgstr ""
301+
msgstr "表示性错误"
291302

292303
#: ../../tutorial/floatingpoint.rst:211
293304
msgid ""
294305
"This section explains the \"0.1\" example in detail, and shows how you can "
295306
"perform an exact analysis of cases like this yourself. Basic familiarity "
296307
"with binary floating-point representation is assumed."
297-
msgstr ""
308+
msgstr "本小节将详细解释 \"0.1\" 的例子,并说明你可以怎样亲自对此类情况进行精确分析。 假定前提是已基本熟悉二进制浮点表示法。"
298309

299310
#: ../../tutorial/floatingpoint.rst:215
300311
msgid ""

0 commit comments

Comments
 (0)