Skip to content

Commit 80d2f31

Browse files
Carisa-Liken71301
andauthored
Translate library/math.po rst: 30-101 (#800)
Co-authored-by: Payon <ken71301@hotmail.com>
1 parent b05a215 commit 80d2f31

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

library/math.po

+27-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
11-
"PO-Revision-Date: 2024-01-03 17:00+0800\n"
11+
"PO-Revision-Date: 2024-02-05 16:30+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -53,66 +53,79 @@ msgstr "此模組提供下列函式。除非特意註明,否則回傳值皆為
5353

5454
#: ../../library/math.rst:30
5555
msgid "Number-theoretic and representation functions"
56-
msgstr ""
56+
msgstr "數論與表現函式"
5757

5858
#: ../../library/math.rst:34
5959
msgid ""
6060
"Return the ceiling of *x*, the smallest integer greater than or equal to "
6161
"*x*. If *x* is not a float, delegates to :meth:`x.__ceil__ <object."
6262
"__ceil__>`, which should return an :class:`~numbers.Integral` value."
6363
msgstr ""
64+
"回傳 *x* 經上取整的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此函式"
65+
"將委派給 :meth:`x.__ceil__ <object.__ceil__>`,並回傳 :class:`~numbers."
66+
"Integral` 型別的值。"
6467

6568
#: ../../library/math.rst:41
6669
msgid ""
6770
"Return the number of ways to choose *k* items from *n* items without "
6871
"repetition and without order."
69-
msgstr ""
72+
msgstr "回傳從 *n* 個物品中不重複且不考慮排序地取出 *k* 個物品的方法數。"
7073

7174
#: ../../library/math.rst:44
7275
msgid ""
7376
"Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero "
7477
"when ``k > n``."
75-
msgstr ""
78+
msgstr "當 ``k <= n`` 時其值為 ``n! / (k! * (n - k)!)``,否則其值為 ``0``。"
7679

7780
#: ../../library/math.rst:47
7881
msgid ""
7982
"Also called the binomial coefficient because it is equivalent to the "
8083
"coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``."
8184
msgstr ""
85+
"因為此值等同於 ``(1 + x)ⁿ`` 進行多項式展開後第 k 項的係數,所以又稱為二項式係"
86+
"數。"
8287

8388
#: ../../library/math.rst:51 ../../library/math.rst:258
8489
msgid ""
8590
"Raises :exc:`TypeError` if either of the arguments are not integers. Raises :"
8691
"exc:`ValueError` if either of the arguments are negative."
8792
msgstr ""
93+
"當任一參數非整數型別時會引發 :exc:`TypeError`。當任一參數為負數時會引發 :exc:"
94+
"`ValueError`。"
8895

8996
#: ../../library/math.rst:59
9097
msgid ""
9198
"Return a float with the magnitude (absolute value) of *x* but the sign of "
9299
"*y*. On platforms that support signed zeros, ``copysign(1.0, -0.0)`` "
93100
"returns *-1.0*."
94101
msgstr ""
102+
"回傳與 *x* 相同長度(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上,"
103+
"``copysign(1.0, -0.0)`` 回傳 *-1.0*。"
95104

96105
#: ../../library/math.rst:66
97106
msgid "Return the absolute value of *x*."
98-
msgstr ""
107+
msgstr "回傳 *x* 的絕對值。"
99108

100109
#: ../../library/math.rst:71
101110
msgid ""
102111
"Return *n* factorial as an integer. Raises :exc:`ValueError` if *n* is not "
103112
"integral or is negative."
104113
msgstr ""
114+
"以整數回傳 *n* 的階乘。若 *n* 非整數型別或其值為負會引發 :exc:`ValueError`。"
105115

106116
#: ../../library/math.rst:74
107117
msgid "Accepting floats with integral values (like ``5.0``) is deprecated."
108-
msgstr ""
118+
msgstr "允許傳入其值為整數的浮點數(如:``5.0``)已被棄用。"
109119

110120
#: ../../library/math.rst:80
111121
msgid ""
112122
"Return the floor of *x*, the largest integer less than or equal to *x*. If "
113123
"*x* is not a float, delegates to :meth:`x.__floor__ <object.__floor__>`, "
114124
"which should return an :class:`~numbers.Integral` value."
115125
msgstr ""
126+
"回傳 *x* 經下取整的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此函式"
127+
"將委派給 :meth:`x.__floor__ <object.__floor__>`,並回傳 :class:`~numbers."
128+
"Integral` 型別的值。"
116129

117130
#: ../../library/math.rst:87
118131
msgid ""
@@ -129,6 +142,14 @@ msgid ""
129142
"generally preferred when working with floats, while Python's ``x % y`` is "
130143
"preferred when working with integers."
131144
msgstr ""
145+
"回傳 C 函式庫所定義的 ``fmod(x, y)`` 函式值。請注意此函式與 Python 運算式 "
146+
"``x % y`` 可能會回傳不同結果。C 標準要求 ``fmod(x, y)`` 的回傳值完全等同(數"
147+
"學定義上,即無限精度)於 ``x - n*y``,*n* 為可使回傳值與 *x* 同號且長度小於 "
148+
"``abs(y)`` 的整數。Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法"
149+
"精確地計算浮點數引數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但 "
150+
"Python 運算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表"
151+
"示成浮點數,並會四捨五入為出乎意料的 ``1e100``。因此,處理浮點數時通常會選擇"
152+
"函式 :func:`fmod`,而處理整數時會選擇 Python 運算式 ``x % y``。"
132153

133154
#: ../../library/math.rst:102
134155
msgid ""

0 commit comments

Comments
 (0)