@@ -2023,184 +2023,229 @@ msgstr ""
2023
2023
#: ../../library/decimal.rst:1214
2024
2024
msgid "Returns the absolute value of *x*."
2025
2025
msgstr ""
2026
+ "返回 *x* 的絕對值。"
2026
2027
2027
2028
#: ../../library/decimal.rst:1219
2028
2029
msgid "Return the sum of *x* and *y*."
2029
2030
msgstr ""
2031
+ "返回 *x* 和 *y* 的和。"
2030
2032
2031
2033
#: ../../library/decimal.rst:1224
2032
2034
msgid "Returns the same Decimal object *x*."
2033
2035
msgstr ""
2036
+ "返回相同的 Decimal 物件 *x*。"
2034
2037
2035
2038
#: ../../library/decimal.rst:1229
2036
2039
msgid "Compares *x* and *y* numerically."
2037
2040
msgstr ""
2041
+ "數值比較 *x* 和 *y*。"
2038
2042
2039
2043
#: ../../library/decimal.rst:1234
2040
2044
msgid "Compares the values of the two operands numerically."
2041
2045
msgstr ""
2046
+ "數值比較兩個運算元的值。"
2042
2047
2043
2048
#: ../../library/decimal.rst:1239
2044
2049
msgid "Compares two operands using their abstract representation."
2045
2050
msgstr ""
2051
+ "使用兩個運算元的抽象表示法進行比較。"
2046
2052
2047
2053
#: ../../library/decimal.rst:1244
2048
2054
msgid ""
2049
2055
"Compares two operands using their abstract representation, ignoring sign."
2050
2056
msgstr ""
2057
+ "使用兩個運算元的抽象表示法進行比較,忽略符號。"
2051
2058
2052
2059
#: ../../library/decimal.rst:1249
2053
2060
msgid "Returns a copy of *x* with the sign set to 0."
2054
2061
msgstr ""
2062
+ "返回 *x* 的副本,將符號設定為 0。"
2055
2063
2056
2064
#: ../../library/decimal.rst:1254
2057
2065
msgid "Returns a copy of *x* with the sign inverted."
2058
2066
msgstr ""
2067
+ "返回 *x* 的副本,將符號反轉。"
2059
2068
2060
2069
#: ../../library/decimal.rst:1259
2061
2070
msgid "Copies the sign from *y* to *x*."
2062
2071
msgstr ""
2072
+ "將 *y* 的符號複製到 *x*。"
2063
2073
2064
2074
#: ../../library/decimal.rst:1264
2065
2075
msgid "Return *x* divided by *y*."
2066
2076
msgstr ""
2077
+ "返回 *x* 除以 *y*。"
2067
2078
2068
2079
#: ../../library/decimal.rst:1269
2069
2080
msgid "Return *x* divided by *y*, truncated to an integer."
2070
2081
msgstr ""
2082
+ "返回 *x* 除以 *y*,截斷為整數。"
2071
2083
2072
2084
#: ../../library/decimal.rst:1274
2073
2085
msgid "Divides two numbers and returns the integer part of the result."
2074
2086
msgstr ""
2087
+ "將兩個數相除並返回結果的整數部分。"
2075
2088
2076
2089
#: ../../library/decimal.rst:1279
2077
2090
msgid "Returns ``e ** x``."
2078
2091
msgstr ""
2092
+ "返回 ``e ** x``。"
2079
2093
2080
2094
#: ../../library/decimal.rst:1284
2081
2095
msgid "Returns *x* multiplied by *y*, plus *z*."
2082
2096
msgstr ""
2097
+ "返回 *x* 乘以 *y* 再加上 *z*。"
2083
2098
2084
2099
#: ../../library/decimal.rst:1289
2085
2100
msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``."
2086
2101
msgstr ""
2102
+ "如果 *x* 是標準形式則返回 ``True``;否則返回 ``False``。"
2087
2103
2088
2104
#: ../../library/decimal.rst:1294
2089
2105
msgid "Returns ``True`` if *x* is finite; otherwise returns ``False``."
2090
2106
msgstr ""
2107
+ "如果 *x* 是有限的則返回 ``True``;否則返回 ``False``。"
2091
2108
2092
2109
#: ../../library/decimal.rst:1299
2093
2110
msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``."
2094
2111
msgstr ""
2112
+ "如果 *x* 是無窮大則返回 ``True``;否則返回 ``False``。"
2095
2113
2096
2114
#: ../../library/decimal.rst:1304
2097
2115
msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``."
2098
2116
msgstr ""
2117
+ "如果 *x* 是 qNaN 或 sNaN 則返回 ``True``;否則返回 ``False``。"
2099
2118
2100
2119
#: ../../library/decimal.rst:1309
2101
2120
msgid ""
2102
2121
"Returns ``True`` if *x* is a normal number; otherwise returns ``False``."
2103
2122
msgstr ""
2123
+ "如果 *x* 是正規數則返回 ``True``;否則返回 ``False``。"
2104
2124
2105
2125
#: ../../library/decimal.rst:1314
2106
2126
msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``."
2107
2127
msgstr ""
2128
+ "如果 *x* 是安靜 NaN 則返回 ``True``;否則返回 ``False``。"
2108
2129
2109
2130
#: ../../library/decimal.rst:1319
2110
2131
msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``."
2111
2132
msgstr ""
2133
+ "如果 *x* 是負數則返回 ``True``;否則返回 ``False``。"
2112
2134
2113
2135
#: ../../library/decimal.rst:1324
2114
2136
msgid ""
2115
2137
"Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``."
2116
2138
msgstr ""
2139
+ "如果 *x* 是發出訊號的 NaN 則返回 ``True``;否則返回 ``False``。"
2117
2140
2118
2141
#: ../../library/decimal.rst:1329
2119
2142
msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``."
2120
2143
msgstr ""
2144
+ "如果 *x* 是次正規則返回 ``True``;否則返回 ``False``。"
2121
2145
2122
2146
#: ../../library/decimal.rst:1334
2123
2147
msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``."
2124
2148
msgstr ""
2149
+ "如果 *x* 是零則返回 ``True``;否則返回 ``False``。"
2125
2150
2126
2151
#: ../../library/decimal.rst:1339
2127
2152
msgid "Returns the natural (base e) logarithm of *x*."
2128
2153
msgstr ""
2154
+ "返回 *x* 的自然(以 e 為底)對數。"
2129
2155
2130
2156
#: ../../library/decimal.rst:1344
2131
2157
msgid "Returns the base 10 logarithm of *x*."
2132
2158
msgstr ""
2159
+ "返回 *x* 的十進位對數。"
2133
2160
2134
2161
#: ../../library/decimal.rst:1349
2135
2162
msgid "Returns the exponent of the magnitude of the operand's MSD."
2136
2163
msgstr ""
2164
+ "返回運算元的 MSD 量級的指數。"
2137
2165
2138
2166
#: ../../library/decimal.rst:1354
2139
2167
msgid "Applies the logical operation *and* between each operand's digits."
2140
2168
msgstr ""
2169
+ "在每個運算元的數字之間套用邏輯運算 *and*。"
2141
2170
2142
2171
#: ../../library/decimal.rst:1359
2143
2172
msgid "Invert all the digits in *x*."
2144
2173
msgstr ""
2174
+ "反轉 *x* 中的所有數字。"
2145
2175
2146
2176
#: ../../library/decimal.rst:1364
2147
2177
msgid "Applies the logical operation *or* between each operand's digits."
2148
2178
msgstr ""
2179
+ "在每個運算元的數字之間套用邏輯運算 *or*。"
2149
2180
2150
2181
#: ../../library/decimal.rst:1369
2151
2182
msgid "Applies the logical operation *xor* between each operand's digits."
2152
2183
msgstr ""
2184
+ "在每個運算元的數字之間套用邏輯運算 *xor*。"
2153
2185
2154
2186
#: ../../library/decimal.rst:1374
2155
2187
msgid "Compares two values numerically and returns the maximum."
2156
2188
msgstr ""
2189
+ "數值比較兩個值並返回最大值。"
2157
2190
2158
2191
#: ../../library/decimal.rst:1379 ../../library/decimal.rst:1389
2159
2192
msgid "Compares the values numerically with their sign ignored."
2160
2193
msgstr ""
2194
+ "數值比較值,忽略其符號。"
2161
2195
2162
2196
#: ../../library/decimal.rst:1384
2163
2197
msgid "Compares two values numerically and returns the minimum."
2164
2198
msgstr ""
2199
+ "數值比較兩個值並返回最小值。"
2165
2200
2166
2201
#: ../../library/decimal.rst:1394
2167
2202
msgid "Minus corresponds to the unary prefix minus operator in Python."
2168
2203
msgstr ""
2204
+ "Minus 對應於 Python 中的一元前綴減號運算子。"
2169
2205
2170
2206
#: ../../library/decimal.rst:1399
2171
2207
msgid "Return the product of *x* and *y*."
2172
2208
msgstr ""
2209
+ "返回 *x* 和 *y* 的乘積。"
2173
2210
2174
2211
#: ../../library/decimal.rst:1404
2175
2212
msgid "Returns the largest representable number smaller than *x*."
2176
2213
msgstr ""
2214
+ "返回小於 *x* 的最大可表示數字。"
2177
2215
2178
2216
#: ../../library/decimal.rst:1409
2179
2217
msgid "Returns the smallest representable number larger than *x*."
2180
2218
msgstr ""
2219
+ "返回大於 *x* 的最小可表示數字。"
2181
2220
2182
2221
#: ../../library/decimal.rst:1414
2183
2222
msgid "Returns the number closest to *x*, in direction towards *y*."
2184
2223
msgstr ""
2224
+ "返回最接近 *x* 的數字,方向指向 *y*。"
2185
2225
2186
2226
#: ../../library/decimal.rst:1419
2187
2227
msgid "Reduces *x* to its simplest form."
2188
2228
msgstr ""
2229
+ "將 *x* 簡化為最簡形式。"
2189
2230
2190
2231
#: ../../library/decimal.rst:1424
2191
2232
msgid "Returns an indication of the class of *x*."
2192
2233
msgstr ""
2234
+ "返回 *x* 類別的指示。"
2193
2235
2194
2236
#: ../../library/decimal.rst:1429
2195
2237
msgid ""
2196
2238
"Plus corresponds to the unary prefix plus operator in Python. This "
2197
2239
"operation applies the context precision and rounding, so it is *not* an "
2198
2240
"identity operation."
2199
2241
msgstr ""
2242
+ "Plus 對應於 Python 中的一元前綴加號運算子。此運算會套用 context 精度和"
2243
+ "将位,因此它 *不是* 一個恆等運算。"
2200
2244
2201
2245
#: ../../library/decimal.rst:1436
2202
2246
msgid "Return ``x`` to the power of ``y``, reduced modulo ``modulo`` if given."
2203
2247
msgstr ""
2248
+ "返回 ``x`` 的 ``y`` 次方,如果有提供則總是 ``modulo`` 的簡化結果。"
2204
2249
2205
2250
#: ../../library/decimal.rst:1438
2206
2251
msgid ""
@@ -2210,6 +2255,10 @@ msgid ""
2210
2255
"rounding mode of the context is used. Results are always correctly rounded "
2211
2256
"in the Python version."
2212
2257
msgstr ""
2258
+ "使用兩個引數計算 ``x**y``。如果 ``x`` 是負數,則 ``y`` 必須是整數。"
2259
+ "除非 ``y`` 是整數且結果是有限的且可以在「精度」位數中精確表示,"
2260
+ "否則結果將是不精確的。使用 context 的将位模式。在 Python 版本中,"
2261
+ "結果總是正確将位的。"
2213
2262
2214
2263
#: ../../library/decimal.rst:1444
2215
2264
msgid ""
@@ -2223,28 +2272,36 @@ msgid ""
2223
2272
"`exp` and :meth:`ln` functions. The result is well-defined but only \" almost "
2224
2273
"always correctly rounded\" ."
2225
2274
msgstr ""
2275
+ "C 模組以正確将位的 :meth:`exp` 和 :meth:`ln` 函式來計算 :meth:`power`。"
2276
+ "結果是定義良好的,但只是「幾乎總是正確将位」。"
2226
2277
2227
2278
#: ../../library/decimal.rst:1452
2228
2279
msgid ""
2229
2280
"With three arguments, compute ``(x**y) % modulo``. For the three argument "
2230
2281
"form, the following restrictions on the arguments hold:"
2231
2282
msgstr ""
2283
+ "使用三個引數計算 ``(x**y) % modulo``。對於三個引數的形式,引數有"
2284
+ "以下限制:"
2232
2285
2233
2286
#: ../../library/decimal.rst:1455
2234
2287
msgid "all three arguments must be integral"
2235
2288
msgstr ""
2289
+ "所有三個引數必須是整數"
2236
2290
2237
2291
#: ../../library/decimal.rst:1456
2238
2292
msgid "``y`` must be nonnegative"
2239
2293
msgstr ""
2294
+ "``y`` 必須是非負數"
2240
2295
2241
2296
#: ../../library/decimal.rst:1457
2242
2297
msgid "at least one of ``x`` or ``y`` must be nonzero"
2243
2298
msgstr ""
2299
+ "``x`` 或 ``y`` 中至少一個必須是非零"
2244
2300
2245
2301
#: ../../library/decimal.rst:1458
2246
2302
msgid "``modulo`` must be nonzero and have at most 'precision' digits"
2247
2303
msgstr ""
2304
+ "``modulo`` 必須是非零且最多有「精度」位數"
2248
2305
2249
2306
#: ../../library/decimal.rst:1460
2250
2307
msgid ""
@@ -2254,30 +2311,38 @@ msgid ""
2254
2311
"zero, regardless of the exponents of ``x``, ``y`` and ``modulo``. The "
2255
2312
"result is always exact."
2256
2313
msgstr ""
2314
+ "精度,但計算更加高效。結果的指數是零,無論 ``x``、``y`` 和 "
2315
+ "``modulo`` 的指數如何。結果總是精確的。"
2257
2316
2258
2317
#: ../../library/decimal.rst:1470
2259
2318
msgid "Returns a value equal to *x* (rounded), having the exponent of *y*."
2260
2319
msgstr ""
2320
+ "返回等於 *x*(将位後)的值,具有 *y* 的指數。"
2261
2321
2262
2322
#: ../../library/decimal.rst:1475
2263
2323
msgid "Just returns 10, as this is Decimal, :)"
2264
2324
msgstr ""
2325
+ "只返回 10,因為這是 Decimal :)"
2265
2326
2266
2327
#: ../../library/decimal.rst:1480
2267
2328
msgid "Returns the remainder from integer division."
2268
2329
msgstr ""
2330
+ "返回整數除法的餘數。"
2269
2331
2270
2332
#: ../../library/decimal.rst:1482
2271
2333
msgid ""
2272
2334
"The sign of the result, if non-zero, is the same as that of the original "
2273
2335
"dividend."
2274
2336
msgstr ""
2337
+ "結果的符號(如果非零)與原始被除數的符號相同。"
2275
2338
2276
2339
#: ../../library/decimal.rst:1488
2277
2340
msgid ""
2278
2341
"Returns ``x - y * n``, where *n* is the integer nearest the exact value of "
2279
2342
"``x / y`` (if the result is 0 then its sign will be the sign of *x*)."
2280
2343
msgstr ""
2344
+ "返回 ``x - y * n``,其中 *n* 是最接近 ``x / y`` 精確值的整數(如果"
2345
+ "結果是 0,則其符號將是 *x* 的符號)。"
2281
2346
2282
2347
#: ../../library/decimal.rst:1494
2283
2348
msgid "Returns a rotated copy of *x*, *y* times."
@@ -2286,30 +2351,37 @@ msgstr ""
2286
2351
#: ../../library/decimal.rst:1499
2287
2352
msgid "Returns ``True`` if the two operands have the same exponent."
2288
2353
msgstr ""
2354
+ "如果兩個運算元具有相同的指數則返回 ``True``。"
2289
2355
2290
2356
#: ../../library/decimal.rst:1504
2291
2357
msgid "Returns the first operand after adding the second value its exp."
2292
2358
msgstr ""
2359
+ "返回第一個運算元在加上第二個值的 exp 後的結果。"
2293
2360
2294
2361
#: ../../library/decimal.rst:1509
2295
2362
msgid "Returns a shifted copy of *x*, *y* times."
2296
2363
msgstr ""
2364
+ "返回 *x* 的移位副本,移位 *y* 次。"
2297
2365
2298
2366
#: ../../library/decimal.rst:1514
2299
2367
msgid "Square root of a non-negative number to context precision."
2300
2368
msgstr ""
2369
+ "非負數在 context 精度下的平方根。"
2301
2370
2302
2371
#: ../../library/decimal.rst:1519
2303
2372
msgid "Return the difference between *x* and *y*."
2304
2373
msgstr ""
2374
+ "返回 *x* 和 *y* 的差。"
2305
2375
2306
2376
#: ../../library/decimal.rst:1533
2307
2377
msgid "Rounds to an integer."
2308
2378
msgstr ""
2379
+ "將位為整數。"
2309
2380
2310
2381
#: ../../library/decimal.rst:1538
2311
2382
msgid "Converts a number to a string using scientific notation."
2312
2383
msgstr ""
2384
+ "使用科學記號法將數字轉換為字串。"
2313
2385
2314
2386
#: ../../library/decimal.rst:1545
2315
2387
msgid "Constants"
@@ -2641,6 +2713,9 @@ msgid ""
2641
2713
"floating-point arithmetic with insufficient precision causes the breakdown "
2642
2714
"of the associative and distributive properties of addition:"
2643
2715
msgstr ""
2716
+ "捨入誤差的影響可能會因為幾乎抵消的數量的加法或減法而被放大,導致有效位數的"
2717
+ "損失。Knuth 提供了兩個教學範例,其中精度不足的捨入浮點運算導致加法的結合"
2718
+ "律和分配律失效:"
2644
2719
2645
2720
#: ../../library/decimal.rst:1775
2646
2721
msgid ""
0 commit comments