Skip to content

Commit

Permalink
Translate library/math.po rst: 30-101 (#800)
Browse files Browse the repository at this point in the history
Co-authored-by: Payon <[email protected]>
  • Loading branch information
Carisa-Li and ken71301 authored Feb 6, 2024
1 parent b05a215 commit 80d2f31
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions library/math.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
"PO-Revision-Date: 2024-01-03 17:00+0800\n"
"PO-Revision-Date: 2024-02-05 16:30+0800\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand Down Expand Up @@ -53,66 +53,79 @@ msgstr "此模組提供下列函式。除非特意註明,否則回傳值皆為

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

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

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

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

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

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

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

#: ../../library/math.rst:66
msgid "Return the absolute value of *x*."
msgstr ""
msgstr "回傳 *x* 的絕對值。"

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

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

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

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

#: ../../library/math.rst:102
msgid ""
Expand Down

0 comments on commit 80d2f31

Please sign in to comment.