@@ -2321,7 +2321,7 @@ msgstr ""
2321
2321
2322
2322
#: ../../library/decimal.rst:1687
2323
2323
msgid "Numerical overflow."
2324
- msgstr ""
2324
+ msgstr "數值溢位。 "
2325
2325
2326
2326
#: ../../library/decimal.rst:1689
2327
2327
msgid ""
@@ -2331,10 +2331,13 @@ msgid ""
2331
2331
"outward to ``Infinity``. In either case, :class:`Inexact` and :class:"
2332
2332
"`Rounded` are also signaled."
2333
2333
msgstr ""
2334
+ "指示在捨入發生後指數大於 :attr:`Context.Emax`。如果未被捕捉,結果取決於捨入"
2335
+ "模式,要麼向內拉到最大可表示的有限數,要麼向外捨入到 ``Infinity``。在任何"
2336
+ "情況下,:class:`Inexact` 和 :class:`Rounded` 也會發出訊號。"
2334
2337
2335
2338
#: ../../library/decimal.rst:1698
2336
2339
msgid "Rounding occurred though possibly no information was lost."
2337
- msgstr ""
2340
+ msgstr "發生了捨入,但可能沒有遺失資訊。 "
2338
2341
2339
2342
#: ../../library/decimal.rst:1700
2340
2343
msgid ""
@@ -2466,6 +2469,7 @@ msgid ""
2466
2469
"The :mod:`decimal` module makes it possible to restore the identities by "
2467
2470
"expanding the precision sufficiently to avoid loss of significance:"
2468
2471
msgstr ""
2472
+ ":mod:`decimal` 模組透過充分擴展精度以避免有效性損失,使恢復恆等式成為可能:"
2469
2473
2470
2474
#: ../../library/decimal.rst:1796
2471
2475
msgid ""
@@ -2493,6 +2497,8 @@ msgid ""
2493
2497
"including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, "
2494
2498
"``+0`` and ``-0``."
2495
2499
msgstr ""
2500
+ ":mod:`decimal` 模組的數字系統提供特殊值,包括 ``NaN``、``sNaN``、"
2501
+ "``-Infinity``、``Infinity`` 和兩個零:``+0`` 和 ``-0``。"
2496
2502
2497
2503
#: ../../library/decimal.rst:1819
2498
2504
msgid ""
@@ -2502,13 +2508,18 @@ msgid ""
2502
2508
"infinity can result from rounding beyond the limits of the largest "
2503
2509
"representable number."
2504
2510
msgstr ""
2511
+ "無窮大可以直接透過 ``Decimal('Infinity')`` 建構。此外,當 :exc:`DivisionByZero` "
2512
+ "訊號未被捕捉時,它們可能來自被零除。同樣地,當 :exc:`Overflow` 訊號未被捕捉時,"
2513
+ "無窮大可能來自超出最大可表示數字限制的捨入。"
2505
2514
2506
2515
#: ../../library/decimal.rst:1824
2507
2516
msgid ""
2508
2517
"The infinities are signed (affine) and can be used in arithmetic operations "
2509
2518
"where they get treated as very large, indeterminate numbers. For instance, "
2510
2519
"adding a constant to infinity gives another infinite result."
2511
2520
msgstr ""
2521
+ "無窮大是有符號的(仿射)並且可以用於算術運算,在那裡它們被視為非常大的不確定"
2522
+ "數字。例如,將常數加到無窮大會得到另一個無限結果。"
2512
2523
2513
2524
#: ../../library/decimal.rst:1828
2514
2525
msgid ""
@@ -2787,30 +2798,37 @@ msgid ""
2787
2798
"Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way "
2788
2799
"to minimize typing when using the interactive interpreter?"
2789
2800
msgstr ""
2801
+ "問:輸入 ``decimal.Decimal('1234.5')`` 很麻煩。在使用互動式直譯器時有沒有"
2802
+ "減少輸入的方法?"
2790
2803
2791
2804
#: ../../library/decimal.rst:2073
2792
2805
msgid "A. Some users abbreviate the constructor to just a single letter:"
2793
- msgstr ""
2806
+ msgstr "答:一些使用者將建構函式縮寫為單個字母: "
2794
2807
2795
2808
#: ../../library/decimal.rst:2079
2796
2809
msgid ""
2797
2810
"Q. In a fixed-point application with two decimal places, some inputs have "
2798
2811
"many places and need to be rounded. Others are not supposed to have excess "
2799
2812
"digits and need to be validated. What methods should be used?"
2800
2813
msgstr ""
2814
+ "問:在有兩個小數位的定點應用程式中,一些輸入有很多位數需要捨入。其他輸入"
2815
+ "不應該有多餘的數字,需要驗證。應該使用什麼方法?"
2801
2816
2802
2817
#: ../../library/decimal.rst:2083
2803
2818
msgid ""
2804
2819
"A. The :meth:`~Decimal.quantize` method rounds to a fixed number of decimal "
2805
2820
"places. If the :const:`Inexact` trap is set, it is also useful for "
2806
2821
"validation:"
2807
2822
msgstr ""
2823
+ "答::meth:`~Decimal.quantize` 方法捨入到固定的小數位數。如果設定了 :const:"
2824
+ "`Inexact` 陷阱,它也對驗證很有用:"
2808
2825
2809
2826
#: ../../library/decimal.rst:2101
2810
2827
msgid ""
2811
2828
"Q. Once I have valid two place inputs, how do I maintain that invariant "
2812
2829
"throughout an application?"
2813
2830
msgstr ""
2831
+ "問:一旦我有了有效的兩位輸入,我如何在整個應用程式中維持這個不變量?"
2814
2832
2815
2833
#: ../../library/decimal.rst:2104
2816
2834
msgid ""
@@ -2819,12 +2837,15 @@ msgid ""
2819
2837
"division and non-integer multiplication, will change the number of decimal "
2820
2838
"places and need to be followed-up with a :meth:`~Decimal.quantize` step:"
2821
2839
msgstr ""
2840
+ "答:像加法、減法和整數乘法這樣的運算會自動保持定點。其他運算,如除法和非整數"
2841
+ "乘法,會改變小數位數,需要用 :meth:`~Decimal.quantize` 步驟跟進:"
2822
2842
2823
2843
#: ../../library/decimal.rst:2122
2824
2844
msgid ""
2825
2845
"In developing fixed-point applications, it is convenient to define functions "
2826
2846
"to handle the :meth:`~Decimal.quantize` step:"
2827
2847
msgstr ""
2848
+ "在開發定點應用程式時,定義函式來處理 :meth:`~Decimal.quantize` 步驟很方便:"
2828
2849
2829
2850
#: ../../library/decimal.rst:2136
2830
2851
msgid ""
@@ -2833,16 +2854,19 @@ msgid ""
2833
2854
"precisions. Is there a way to transform them to a single recognizable "
2834
2855
"canonical value?"
2835
2856
msgstr ""
2857
+ "問:有很多方式表達相同的值。數字 ``200``、``200.000``、``2E2`` 和 ``.02E+4`` "
2858
+ "在不同精度下都有相同的值。有沒有辦法將它們轉換為單一可識別的標準值?"
2836
2859
2837
2860
#: ../../library/decimal.rst:2141
2838
2861
msgid ""
2839
2862
"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a "
2840
2863
"single representative:"
2841
2864
msgstr ""
2865
+ "答::meth:`~Decimal.normalize` 方法將所有等價值映射到單一代表:"
2842
2866
2843
2867
#: ../../library/decimal.rst:2148
2844
2868
msgid "Q. When does rounding occur in a computation?"
2845
- msgstr ""
2869
+ msgstr "問:在計算中什麼時候發生捨入? "
2846
2870
2847
2871
#: ../../library/decimal.rst:2150
2848
2872
msgid ""
@@ -2853,6 +2877,9 @@ msgid ""
2853
2877
"rounding (or other context operations) is applied to the *result* of the "
2854
2878
"computation::"
2855
2879
msgstr ""
2880
+ "答:它發生在計算 *之後*。decimal 規範的理念是數字被視為精確的,並且獨立於"
2881
+ "目前情境而建立。它們甚至可以比目前情境具有更高的精度。計算使用這些精確的"
2882
+ "輸入進行處理,然後將捨入(或其他情境運算)應用於計算的 *結果*: ::"
2856
2883
2857
2884
#: ../../library/decimal.rst:2157
2858
2885
msgid ""
0 commit comments