@@ -824,6 +824,8 @@ msgid ""
824824"`Decimal` instance as a fraction, in lowest terms and with a positive "
825825"denominator::"
826826msgstr ""
827+ "回傳一對表示給定 :class:`Decimal` 實例作為分數的整數 ``(n, d)``,以最簡形式"
828+ "且分母為正: ::"
827829
828830#: ../../library/decimal.rst:467
829831msgid ""
@@ -838,25 +840,32 @@ msgid ""
838840"The conversion is exact. Raise OverflowError on infinities and ValueError "
839841"on NaNs."
840842msgstr ""
843+ "轉換是精確的。對無窮大引發 OverflowError,對 NaN 引發 ValueError。"
841844
842845#: ../../library/decimal.rst:477
843846msgid ""
844847"Return a :term:`named tuple` representation of the number: "
845848"``DecimalTuple(sign, digits, exponent)``."
846849msgstr ""
850+ "回傳數字的 :term:`named tuple` 表示形式:"
851+ "``DecimalTuple(sign, digits, exponent)``。"
847852
848853#: ../../library/decimal.rst:483
849854msgid ""
850855"Return the canonical encoding of the argument. Currently, the encoding of "
851856"a :class:`Decimal` instance is always canonical, so this operation returns "
852857"its argument unchanged."
853858msgstr ""
859+ "回傳引數的標準編碼。目前,:class:`Decimal` 實例的編碼總是標準的,因此此運算"
860+ "回傳其引數不變。"
854861
855862#: ../../library/decimal.rst:489
856863msgid ""
857864"Compare the values of two Decimal instances. :meth:`compare` returns a "
858865"Decimal instance, and if either operand is a NaN then the result is a NaN::"
859866msgstr ""
867+ "比較兩個 Decimal 實例的值。:meth:`compare` 回傳一個 Decimal 實例,如果任一"
868+ "運算元是 NaN,則結果是 NaN: ::"
860869
861870#: ../../library/decimal.rst:493
862871msgid ""
@@ -876,6 +885,9 @@ msgid ""
876885"NaNs signal. That is, if neither operand is a signaling NaN then any quiet "
877886"NaN operand is treated as though it were a signaling NaN."
878887msgstr ""
888+ "此運算與 :meth:`compare` 方法相同,除了所有 NaN 都會發出訊號。也就是說,如果"
889+ "兩個運算元都不是發出訊號的 NaN,那麼任何安靜的 NaN 運算元都會被視為發出訊號的 "
890+ "NaN。"
879891
880892#: ../../library/decimal.rst:506
881893msgid ""
@@ -885,6 +897,9 @@ msgid ""
885897"instances with the same numeric value but different representations compare "
886898"unequal in this ordering:"
887899msgstr ""
900+ "使用抽象表示而不是數值來比較兩個運算元。類似於 :meth:`compare` 方法,但結果"
901+ "對 :class:`Decimal` 實例給出全序。在此排序中,具有相同數值但不同表示的兩個 "
902+ ":class:`Decimal` 實例比較為不相等:"
888903
889904#: ../../library/decimal.rst:515
890905msgid ""
@@ -895,6 +910,10 @@ msgid ""
895910"in the total order than the second operand. See the specification for "
896911"details of the total order."
897912msgstr ""
913+ "安靜和發出訊號的 NaN 也包含在全序中。如果兩個運算元具有相同的表示,此函式的"
914+ "結果是 ``Decimal('0')``;如果第一個運算元在全序中低於第二個,則為 "
915+ "``Decimal('-1')``;如果第一個運算元在全序中高於第二個運算元,則為 "
916+ "``Decimal('1')``。有關全序的詳細資訊,請參閱規範。"
898917
899918#: ../../library/decimal.rst:522 ../../library/decimal.rst:533
900919#: ../../library/decimal.rst:561 ../../library/decimal.rst:848
@@ -903,6 +922,8 @@ msgid ""
903922"and no rounding is performed. As an exception, the C version may raise "
904923"InvalidOperation if the second operand cannot be converted exactly."
905924msgstr ""
925+ "此運算不受情境影響且是安靜的:不會變更旗標也不會執行捨入。例外情況下,如果"
926+ "第二個運算元無法精確轉換,C 版本可能會引發 InvalidOperation。"
906927
907928#: ../../library/decimal.rst:528
908929msgid ""
@@ -911,43 +932,53 @@ msgid ""
911932"``x.compare_total_mag(y)`` is equivalent to ``x.copy_abs().compare_total(y."
912933"copy_abs())``."
913934msgstr ""
935+ "如 :meth:`compare_total` 般使用抽象表示而不是值來比較兩個運算元,但忽略每個"
936+ "運算元的符號。``x.compare_total_mag(y)`` 等於 ``x.copy_abs().compare_total"
937+ "(y.copy_abs())``。"
914938
915939#: ../../library/decimal.rst:539
916940msgid ""
917941"Just returns self, this method is only to comply with the Decimal "
918942"Specification."
919943msgstr ""
944+ "只是回傳 self,此方法僅為符合 Decimal 規範。"
920945
921946#: ../../library/decimal.rst:544
922947msgid ""
923948"Return the absolute value of the argument. This operation is unaffected by "
924949"the context and is quiet: no flags are changed and no rounding is performed."
925950msgstr ""
951+ "回傳引數的絕對值。此運算不受情境影響且是安靜的:不會變更旗標也不會執行捨入。"
926952
927953#: ../../library/decimal.rst:550
928954msgid ""
929955"Return the negation of the argument. This operation is unaffected by the "
930956"context and is quiet: no flags are changed and no rounding is performed."
931957msgstr ""
958+ "回傳引數的否定。此運算不受情境影響且是安靜的:不會變更旗標也不會執行捨入。"
932959
933960#: ../../library/decimal.rst:555
934961msgid ""
935962"Return a copy of the first operand with the sign set to be the same as the "
936963"sign of the second operand. For example:"
937964msgstr ""
965+ "回傳第一個運算元的副本,其符號被設定為與第二個運算元的符號相同。例如:"
938966
939967#: ../../library/decimal.rst:567
940968msgid ""
941969"Return the value of the (natural) exponential function ``e**x`` at the given "
942970"number. The result is correctly rounded using the :const:`ROUND_HALF_EVEN` "
943971"rounding mode."
944972msgstr ""
973+ "回傳給定數字的(自然)指數函式 ``e**x`` 的值。使用 :const:`ROUND_HALF_EVEN` "
974+ "捨入模式正確地捨入結果。"
945975
946976#: ../../library/decimal.rst:578
947977msgid ""
948978"Alternative constructor that only accepts instances of :class:`float` or :"
949979"class:`int`."
950980msgstr ""
981+ "僅接受 :class:`float` 或 :class:`int` 實例的替代建構函式。"
951982
952983#: ../../library/decimal.rst:581
953984msgid ""
@@ -957,12 +988,17 @@ msgid ""
957988"``0x1.999999999999ap-4``. That equivalent value in decimal is "
958989"``0.1000000000000000055511151231257827021181583404541015625``."
959990msgstr ""
991+ "注意 ``Decimal.from_float(0.1)`` 與 ``Decimal('0.1')`` 不同。由於 0.1 在"
992+ "二進位浮點數中無法精確表示,該值被儲存為最接近的可表示值 "
993+ "``0x1.999999999999ap-4``。該值在十進位中的等價值是 "
994+ "``0.1000000000000000055511151231257827021181583404541015625``。"
960995
961996#: ../../library/decimal.rst:587
962997msgid ""
963998"From Python 3.2 onwards, a :class:`Decimal` instance can also be constructed "
964999"directly from a :class:`float`."
9651000msgstr ""
1001+ "從 Python 3.2 開始,:class:`Decimal` 實例也可以直接從 :class:`float` 建構。"
9661002
9671003#: ../../library/decimal.rst:590
9681004msgid ""
@@ -989,49 +1025,61 @@ msgid ""
9891025"Fused multiply-add. Return self*other+third with no rounding of the "
9901026"intermediate product self*other."
9911027msgstr ""
1028+ "融合乘加。回傳 self*other+third,對中間產品 self*other 不進行捨入。"
9921029
9931030#: ../../library/decimal.rst:613
9941031msgid ""
9951032"Return :const:`True` if the argument is canonical and :const:`False` "
9961033"otherwise. Currently, a :class:`Decimal` instance is always canonical, so "
9971034"this operation always returns :const:`True`."
9981035msgstr ""
1036+ "如果引數是標準形式則回傳 :const:`True`,否則回傳 :const:`False`。目前,"
1037+ ":class:`Decimal` 實例總是標準形式,因此此運算總是回傳 :const:`True`。"
9991038
10001039#: ../../library/decimal.rst:619
10011040msgid ""
10021041"Return :const:`True` if the argument is a finite number, and :const:`False` "
10031042"if the argument is an infinity or a NaN."
10041043msgstr ""
1044+ "如果引數是有限數則回傳 :const:`True`,如果引數是無窮大或 NaN 則回傳 "
1045+ ":const:`False`。"
10051046
10061047#: ../../library/decimal.rst:624
10071048msgid ""
10081049"Return :const:`True` if the argument is either positive or negative infinity "
10091050"and :const:`False` otherwise."
10101051msgstr ""
1052+ "如果引數是正無窮大或負無窮大則回傳 :const:`True`,否則回傳 :const:`False`。"
10111053
10121054#: ../../library/decimal.rst:629
10131055msgid ""
10141056"Return :const:`True` if the argument is a (quiet or signaling) NaN and :"
10151057"const:`False` otherwise."
10161058msgstr ""
1059+ "如果引數是(安靜或發出訊號的)NaN 則回傳 :const:`True`,否則回傳 :const:`False`。"
10171060
10181061#: ../../library/decimal.rst:634
10191062msgid ""
10201063"Return :const:`True` if the argument is a *normal* finite number. Return :"
10211064"const:`False` if the argument is zero, subnormal, infinite or a NaN."
10221065msgstr ""
1066+ "如果引數是 *正常* 有限數則回傳 :const:`True`。如果引數是零、次正規、無窮大"
1067+ "或 NaN 則回傳 :const:`False`。"
10231068
10241069#: ../../library/decimal.rst:639
10251070msgid ""
10261071"Return :const:`True` if the argument is a quiet NaN, and :const:`False` "
10271072"otherwise."
10281073msgstr ""
1074+ "如果引數是安靜 NaN 則回傳 :const:`True`,否則回傳 :const:`False`。"
10291075
10301076#: ../../library/decimal.rst:644
10311077msgid ""
10321078"Return :const:`True` if the argument has a negative sign and :const:`False` "
10331079"otherwise. Note that zeros and NaNs can both carry signs."
10341080msgstr ""
1081+ "如果引數具有負號則回傳 :const:`True`,否則回傳 :const:`False`。注意零和 NaN "
1082+ "都可以帶有符號。"
10351083
10361084#: ../../library/decimal.rst:649
10371085msgid ""
@@ -2125,41 +2173,42 @@ msgstr ""
21252173
21262174#: ../../library/decimal.rst:1580
21272175msgid "Rounding modes"
2128- msgstr ""
2176+ msgstr "捨入模式 "
21292177
21302178#: ../../library/decimal.rst:1584
21312179msgid "Round towards ``Infinity``."
2132- msgstr ""
2180+ msgstr "向 ``Infinity`` 捨入。 "
21332181
21342182#: ../../library/decimal.rst:1588
21352183msgid "Round towards zero."
2136- msgstr ""
2184+ msgstr "向零捨入。 "
21372185
21382186#: ../../library/decimal.rst:1592
21392187msgid "Round towards ``-Infinity``."
2140- msgstr ""
2188+ msgstr "向 ``-Infinity`` 捨入。 "
21412189
21422190#: ../../library/decimal.rst:1596
21432191msgid "Round to nearest with ties going towards zero."
2144- msgstr ""
2192+ msgstr "捨入到最近值,平局時向零捨入。 "
21452193
21462194#: ../../library/decimal.rst:1600
21472195msgid "Round to nearest with ties going to nearest even integer."
2148- msgstr ""
2196+ msgstr "捨入到最近值,平局時向最近的偶數捨入。 "
21492197
21502198#: ../../library/decimal.rst:1604
21512199msgid "Round to nearest with ties going away from zero."
2152- msgstr ""
2200+ msgstr "捨入到最近值,平局時遠離零捨入。 "
21532201
21542202#: ../../library/decimal.rst:1608
21552203msgid "Round away from zero."
2156- msgstr ""
2204+ msgstr "遠離零捨入。 "
21572205
21582206#: ../../library/decimal.rst:1612
21592207msgid ""
21602208"Round away from zero if last digit after rounding towards zero would have "
21612209"been 0 or 5; otherwise round towards zero."
21622210msgstr ""
2211+ "如果向零捨入後的最後一位數字為 0 或 5,則遠離零捨入;否則向零捨入。"
21632212
21642213#: ../../library/decimal.rst:1619
21652214msgid "Signals"
@@ -2196,50 +2245,57 @@ msgstr ""
21962245
21972246#: ../../library/decimal.rst:1637
21982247msgid "Altered an exponent to fit representation constraints."
2199- msgstr ""
2248+ msgstr "更改指數以符合表示限制。 "
22002249
22012250#: ../../library/decimal.rst:1639
22022251msgid ""
22032252"Typically, clamping occurs when an exponent falls outside the context's :"
22042253"attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the "
22052254"exponent is reduced to fit by adding zeros to the coefficient."
22062255msgstr ""
2256+ "通常,當指數超出情境的 :attr:`~Context.Emin` 和 :attr:`~Context.Emax` 限制時,"
2257+ "會發生夾制。如果可能的話,透過在係數中新增零來縮小指數以符合限制。"
22072258
22082259#: ../../library/decimal.rst:1646
22092260msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`."
2210- msgstr ""
2261+ msgstr "其他訊號的基底類別,也是 :exc:`ArithmeticError` 的子類別。 "
22112262
22122263#: ../../library/decimal.rst:1651
22132264msgid "Signals the division of a non-infinite number by zero."
2214- msgstr ""
2265+ msgstr "發出非無限數被零除的訊號。 "
22152266
22162267#: ../../library/decimal.rst:1653
22172268msgid ""
22182269"Can occur with division, modulo division, or when raising a number to a "
22192270"negative power. If this signal is not trapped, returns ``Infinity`` or ``-"
22202271"Infinity`` with the sign determined by the inputs to the calculation."
22212272msgstr ""
2273+ "可能發生在除法、模除法或將數字提升到負次方時。如果此訊號未被捕捉,回傳 "
2274+ "``Infinity`` 或 ``-Infinity``,符號由計算的輸入決定。"
22222275
22232276#: ../../library/decimal.rst:1660
22242277msgid "Indicates that rounding occurred and the result is not exact."
2225- msgstr ""
2278+ msgstr "指示發生了捨入且結果不精確。 "
22262279
22272280#: ../../library/decimal.rst:1662
22282281msgid ""
22292282"Signals when non-zero digits were discarded during rounding. The rounded "
22302283"result is returned. The signal flag or trap is used to detect when results "
22312284"are inexact."
22322285msgstr ""
2286+ "當捨入過程中丟棄非零數字時發出訊號。回傳捨入結果。訊號旗標或陷阱用於檢測"
2287+ "結果何時不精確。"
22332288
22342289#: ../../library/decimal.rst:1669
22352290msgid "An invalid operation was performed."
2236- msgstr ""
2291+ msgstr "執行了無效的運算。 "
22372292
22382293#: ../../library/decimal.rst:1671
22392294msgid ""
22402295"Indicates that an operation was requested that does not make sense. If not "
22412296"trapped, returns ``NaN``. Possible causes include::"
22422297msgstr ""
2298+ "指示請求了不合理的運算。如果未被捕捉,回傳 ``NaN``。可能的原因包括: ::"
22432299
22442300#: ../../library/decimal.rst:1674
22452301msgid ""