diff --git a/library/math.po b/library/math.po index e5df4b088c..37fdeb724b 100644 --- a/library/math.po +++ b/library/math.po @@ -70,7 +70,7 @@ msgstr ":func:`factorial(n) `" #: ../../library/math.rst:33 msgid "*n* factorial" -msgstr "" +msgstr "*n* 的階乘" #: ../../library/math.rst:34 msgid ":func:`gcd(*integers) `" @@ -78,7 +78,7 @@ msgstr ":func:`gcd(*integers) `" #: ../../library/math.rst:34 msgid "Greatest common divisor of the integer arguments" -msgstr "" +msgstr "整數引數的最大公因數" #: ../../library/math.rst:35 msgid ":func:`isqrt(n) `" @@ -86,7 +86,7 @@ msgstr ":func:`isqrt(n) `" #: ../../library/math.rst:35 msgid "Integer square root of a nonnegative integer *n*" -msgstr "" +msgstr "非負整數 *n* 的整數平方根" #: ../../library/math.rst:36 msgid ":func:`lcm(*integers) `" @@ -94,7 +94,7 @@ msgstr ":func:`lcm(*integers) `" #: ../../library/math.rst:36 msgid "Least common multiple of the integer arguments" -msgstr "" +msgstr "整數引數的最小公倍數" #: ../../library/math.rst:37 msgid ":func:`perm(n, k) `" @@ -108,7 +108,7 @@ msgstr "從 *n* 個物品中不重複但考慮排序地取出 *k* 個物品的 #: ../../library/math.rst:39 msgid "**Floating point arithmetic**" -msgstr "" +msgstr "**浮點數算術運算**" #: ../../library/math.rst:41 msgid ":func:`ceil(x) `" @@ -116,7 +116,7 @@ msgstr ":func:`ceil(x) `" #: ../../library/math.rst:41 msgid "Ceiling of *x*, the smallest integer greater than or equal to *x*" -msgstr "" +msgstr "*x* 的上取整值,即大於或等於 *x* 的最小整數" #: ../../library/math.rst:42 msgid ":func:`fabs(x) `" @@ -132,7 +132,7 @@ msgstr ":func:`floor(x) `" #: ../../library/math.rst:43 msgid "Floor of *x*, the largest integer less than or equal to *x*" -msgstr "" +msgstr "*x* 的下取整值,即小於或等於 *x* 的最大整數" #: ../../library/math.rst:44 msgid ":func:`fma(x, y, z) `" @@ -140,7 +140,7 @@ msgstr ":func:`fma(x, y, z) `" #: ../../library/math.rst:44 msgid "Fused multiply-add operation: ``(x * y) + z``" -msgstr "" +msgstr "融合乘加運算:``(x * y) + z``" #: ../../library/math.rst:45 msgid ":func:`fmod(x, y) `" @@ -148,7 +148,7 @@ msgstr ":func:`fmod(x, y) `" #: ../../library/math.rst:45 msgid "Remainder of division ``x / y``" -msgstr "" +msgstr "除法 ``x / y`` 的餘數" #: ../../library/math.rst:46 msgid ":func:`modf(x) `" @@ -156,7 +156,7 @@ msgstr ":func:`modf(x) `" #: ../../library/math.rst:46 msgid "Fractional and integer parts of *x*" -msgstr "" +msgstr "*x* 的小數部分與整數部分" #: ../../library/math.rst:47 msgid ":func:`remainder(x, y) `" @@ -164,7 +164,7 @@ msgstr ":func:`remainder(x, y) `" #: ../../library/math.rst:47 msgid "Remainder of *x* with respect to *y*" -msgstr "" +msgstr "*x* 相對於 *y* 的餘數" #: ../../library/math.rst:48 msgid ":func:`trunc(x) `" @@ -172,7 +172,7 @@ msgstr ":func:`trunc(x) `" #: ../../library/math.rst:48 msgid "Integer part of *x*" -msgstr "" +msgstr "*x* 的整數部分" #: ../../library/math.rst:50 msgid "**Floating point manipulation functions**" @@ -184,7 +184,7 @@ msgstr ":func:`copysign(x, y) `" #: ../../library/math.rst:52 msgid "Magnitude (absolute value) of *x* with the sign of *y*" -msgstr "" +msgstr "帶有 *y* 的正負號的 *x* 的量值(絕對值)" #: ../../library/math.rst:53 msgid ":func:`frexp(x) `" @@ -192,7 +192,7 @@ msgstr ":func:`frexp(x) `" #: ../../library/math.rst:53 msgid "Mantissa and exponent of *x*" -msgstr "" +msgstr "*x* 的尾數與指數" #: ../../library/math.rst:54 msgid ":func:`isclose(a, b, rel_tol, abs_tol) `" @@ -200,7 +200,7 @@ msgstr ":func:`isclose(a, b, rel_tol, abs_tol) `" #: ../../library/math.rst:54 msgid "Check if the values *a* and *b* are close to each other" -msgstr "" +msgstr "檢查 *a* 與 *b* 兩值是否足夠接近" #: ../../library/math.rst:55 msgid ":func:`isfinite(x) `" @@ -208,7 +208,7 @@ msgstr ":func:`isfinite(x) `" #: ../../library/math.rst:55 msgid "Check if *x* is neither an infinity nor a NaN" -msgstr "" +msgstr "檢查 *x* 是否既非無限值也非 NaN" #: ../../library/math.rst:56 msgid ":func:`isinf(x) `" @@ -216,7 +216,7 @@ msgstr ":func:`isinf(x) `" #: ../../library/math.rst:56 msgid "Check if *x* is a positive or negative infinity" -msgstr "" +msgstr "檢查 *x* 是否為正無限或負無限" #: ../../library/math.rst:57 msgid ":func:`isnan(x) `" @@ -224,7 +224,7 @@ msgstr ":func:`isnan(x) `" #: ../../library/math.rst:57 msgid "Check if *x* is a NaN (not a number)" -msgstr "" +msgstr "檢查 *x* 是否為 NaN(非數值)" #: ../../library/math.rst:58 msgid ":func:`ldexp(x, i) `" @@ -232,7 +232,7 @@ msgstr ":func:`ldexp(x, i) `" #: ../../library/math.rst:58 msgid "``x * (2**i)``, inverse of function :func:`frexp`" -msgstr "" +msgstr "``x * (2**i)``,:func:`frexp` 的反函式" #: ../../library/math.rst:59 msgid ":func:`nextafter(x, y, steps) `" @@ -240,7 +240,7 @@ msgstr ":func:`nextafter(x, y, steps) `" #: ../../library/math.rst:59 msgid "Floating-point value *steps* steps after *x* towards *y*" -msgstr "" +msgstr "從 *x* 向 *y* 移動 *steps* 步的浮點數值" #: ../../library/math.rst:60 msgid ":func:`ulp(x) `" @@ -248,11 +248,11 @@ msgstr ":func:`ulp(x) `" #: ../../library/math.rst:60 msgid "Value of the least significant bit of *x*" -msgstr "" +msgstr "*x* 的最低有效位元的值" #: ../../library/math.rst:62 msgid "**Power, exponential and logarithmic functions**" -msgstr "" +msgstr "**次方、指數與對數函式**" #: ../../library/math.rst:64 msgid ":func:`cbrt(x) `" @@ -260,7 +260,7 @@ msgstr ":func:`cbrt(x) `" #: ../../library/math.rst:64 msgid "Cube root of *x*" -msgstr "" +msgstr "*x* 的立方根" #: ../../library/math.rst:65 msgid ":func:`exp(x) `" @@ -268,7 +268,7 @@ msgstr ":func:`exp(x) `" #: ../../library/math.rst:65 msgid "*e* raised to the power *x*" -msgstr "" +msgstr "*e* 的 *x* 次方" #: ../../library/math.rst:66 msgid ":func:`exp2(x) `" @@ -276,7 +276,7 @@ msgstr ":func:`exp2(x) `" #: ../../library/math.rst:66 msgid "*2* raised to the power *x*" -msgstr "" +msgstr "*2* 的 *x* 次方" #: ../../library/math.rst:67 msgid ":func:`expm1(x) `" @@ -284,7 +284,7 @@ msgstr ":func:`expm1(x) `" #: ../../library/math.rst:67 msgid "*e* raised to the power *x*, minus 1" -msgstr "" +msgstr "*e* 的 *x* 次方減 1" #: ../../library/math.rst:68 msgid ":func:`log(x, base) `" @@ -292,7 +292,7 @@ msgstr ":func:`log(x, base) `" #: ../../library/math.rst:68 msgid "Logarithm of *x* to the given base (*e* by default)" -msgstr "" +msgstr "*x* 以給定底數(預設為 *e*)的對數" #: ../../library/math.rst:69 msgid ":func:`log1p(x) `" @@ -300,7 +300,7 @@ msgstr ":func:`log1p(x) `" #: ../../library/math.rst:69 msgid "Natural logarithm of *1+x* (base *e*)" -msgstr "" +msgstr "*1+x* 的自然對數(以 *e* 為底)" #: ../../library/math.rst:70 msgid ":func:`log2(x) `" @@ -308,7 +308,7 @@ msgstr ":func:`log2(x) `" #: ../../library/math.rst:70 msgid "Base-2 logarithm of *x*" -msgstr "" +msgstr "*x* 的以 2 為底的對數" #: ../../library/math.rst:71 msgid ":func:`log10(x) `" @@ -316,7 +316,7 @@ msgstr ":func:`log10(x) `" #: ../../library/math.rst:71 msgid "Base-10 logarithm of *x*" -msgstr "" +msgstr "*x* 的以 10 為底的對數" #: ../../library/math.rst:72 msgid ":func:`pow(x, y) `" @@ -324,7 +324,7 @@ msgstr ":func:`pow(x, y) `" #: ../../library/math.rst:72 msgid "*x* raised to the power *y*" -msgstr "" +msgstr "*x* 的 *y* 次方" #: ../../library/math.rst:73 msgid ":func:`sqrt(x) `" @@ -336,7 +336,7 @@ msgstr "*x* 的平方根" #: ../../library/math.rst:75 msgid "**Summation and product functions**" -msgstr "" +msgstr "**總和與乘積函式**" #: ../../library/math.rst:77 msgid ":func:`dist(p, q) `" @@ -346,7 +346,7 @@ msgstr ":func:`dist(p, q) `" msgid "" "Euclidean distance between two points *p* and *q* given as an iterable of " "coordinates" -msgstr "" +msgstr "兩點 *p* 與 *q* 之間的歐幾里得距離,各點以座標的可疊代物件表示" #: ../../library/math.rst:78 msgid ":func:`fsum(iterable) `" @@ -354,7 +354,7 @@ msgstr ":func:`fsum(iterable) `" #: ../../library/math.rst:78 msgid "Sum of values in the input *iterable*" -msgstr "" +msgstr "輸入 *iterable* 中所有值的總和" #: ../../library/math.rst:79 msgid ":func:`hypot(*coordinates) `" @@ -362,7 +362,7 @@ msgstr ":func:`hypot(*coordinates) `" #: ../../library/math.rst:79 msgid "Euclidean norm of an iterable of coordinates" -msgstr "" +msgstr "座標可疊代物件的歐幾里得範數" #: ../../library/math.rst:80 msgid ":func:`prod(iterable, start) `" @@ -370,7 +370,7 @@ msgstr ":func:`prod(iterable, start) `" #: ../../library/math.rst:80 msgid "Product of elements in the input *iterable* with a *start* value" -msgstr "" +msgstr "輸入 *iterable* 中所有元素與 *start* 起始值的乘積" #: ../../library/math.rst:81 msgid ":func:`sumprod(p, q) `" @@ -378,11 +378,11 @@ msgstr ":func:`sumprod(p, q) `" #: ../../library/math.rst:81 msgid "Sum of products from two iterables *p* and *q*" -msgstr "" +msgstr "兩個可疊代物件 *p* 與 *q* 各元素乘積的總和" #: ../../library/math.rst:83 msgid "**Angular conversion**" -msgstr "" +msgstr "**角度轉換**" #: ../../library/math.rst:85 msgid ":func:`degrees(x) `" @@ -390,7 +390,7 @@ msgstr ":func:`degrees(x) `" #: ../../library/math.rst:85 msgid "Convert angle *x* from radians to degrees" -msgstr "" +msgstr "將角度 *x* 從弧度轉換為度" #: ../../library/math.rst:86 msgid ":func:`radians(x) `" @@ -398,11 +398,11 @@ msgstr ":func:`radians(x) `" #: ../../library/math.rst:86 msgid "Convert angle *x* from degrees to radians" -msgstr "" +msgstr "將角度 *x* 從度轉換為弧度" #: ../../library/math.rst:88 msgid "**Trigonometric functions**" -msgstr "" +msgstr "**三角函式**" #: ../../library/math.rst:90 msgid ":func:`acos(x) `" @@ -410,7 +410,7 @@ msgstr ":func:`acos(x) `" #: ../../library/math.rst:90 msgid "Arc cosine of *x*" -msgstr "" +msgstr "*x* 的反餘弦" #: ../../library/math.rst:91 msgid ":func:`asin(x) `" @@ -418,7 +418,7 @@ msgstr ":func:`asin(x) `" #: ../../library/math.rst:91 msgid "Arc sine of *x*" -msgstr "" +msgstr "*x* 的反正弦" #: ../../library/math.rst:92 msgid ":func:`atan(x) `" @@ -426,7 +426,7 @@ msgstr ":func:`atan(x) `" #: ../../library/math.rst:92 msgid "Arc tangent of *x*" -msgstr "" +msgstr "*x* 的反正切" #: ../../library/math.rst:93 msgid ":func:`atan2(y, x) `" @@ -442,7 +442,7 @@ msgstr ":func:`cos(x) `" #: ../../library/math.rst:94 msgid "Cosine of *x*" -msgstr "" +msgstr "*x* 的餘弦" #: ../../library/math.rst:95 msgid ":func:`sin(x) `" @@ -450,7 +450,7 @@ msgstr ":func:`sin(x) `" #: ../../library/math.rst:95 msgid "Sine of *x*" -msgstr "" +msgstr "*x* 的正弦" #: ../../library/math.rst:96 msgid ":func:`tan(x) `" @@ -458,11 +458,11 @@ msgstr ":func:`tan(x) `" #: ../../library/math.rst:96 msgid "Tangent of *x*" -msgstr "" +msgstr "*x* 的正切" #: ../../library/math.rst:98 msgid "**Hyperbolic functions**" -msgstr "" +msgstr "**雙曲函式**" #: ../../library/math.rst:100 msgid ":func:`acosh(x) `" @@ -470,7 +470,7 @@ msgstr ":func:`acosh(x) `" #: ../../library/math.rst:100 msgid "Inverse hyperbolic cosine of *x*" -msgstr "" +msgstr "*x* 的反雙曲餘弦" #: ../../library/math.rst:101 msgid ":func:`asinh(x) `" @@ -478,7 +478,7 @@ msgstr ":func:`asinh(x) `" #: ../../library/math.rst:101 msgid "Inverse hyperbolic sine of *x*" -msgstr "" +msgstr "*x* 的反雙曲正弦" #: ../../library/math.rst:102 msgid ":func:`atanh(x) `" @@ -486,7 +486,7 @@ msgstr ":func:`atanh(x) `" #: ../../library/math.rst:102 msgid "Inverse hyperbolic tangent of *x*" -msgstr "" +msgstr "*x* 的反雙曲正切" #: ../../library/math.rst:103 msgid ":func:`cosh(x) `" @@ -494,7 +494,7 @@ msgstr ":func:`cosh(x) `" #: ../../library/math.rst:103 msgid "Hyperbolic cosine of *x*" -msgstr "" +msgstr "*x* 的雙曲餘弦" #: ../../library/math.rst:104 msgid ":func:`sinh(x) `" @@ -502,7 +502,7 @@ msgstr ":func:`sinh(x) `" #: ../../library/math.rst:104 msgid "Hyperbolic sine of *x*" -msgstr "" +msgstr "*x* 的雙曲正弦" #: ../../library/math.rst:105 msgid ":func:`tanh(x) `" @@ -510,11 +510,11 @@ msgstr ":func:`tanh(x) `" #: ../../library/math.rst:105 msgid "Hyperbolic tangent of *x*" -msgstr "" +msgstr "*x* 的雙曲正切" #: ../../library/math.rst:107 msgid "**Special functions**" -msgstr "" +msgstr "**特殊函式**" #: ../../library/math.rst:109 msgid ":func:`erf(x) `" @@ -522,7 +522,7 @@ msgstr ":func:`erf(x) `" #: ../../library/math.rst:109 msgid "`Error function `_ at *x*" -msgstr "" +msgstr "在 *x* 處的\\ `誤差函式 `_\\ 值" #: ../../library/math.rst:110 msgid ":func:`erfc(x) `" @@ -533,6 +533,8 @@ msgid "" "`Complementary error function `_ at *x*" msgstr "" +"在 *x* 處的\\ `互補誤差函式 `_\\ 值" #: ../../library/math.rst:111 msgid ":func:`gamma(x) `" @@ -540,7 +542,7 @@ msgstr ":func:`gamma(x) `" #: ../../library/math.rst:111 msgid "`Gamma function `_ at *x*" -msgstr "" +msgstr "在 *x* 處的 `Gamma 函式 `_\\ 值" #: ../../library/math.rst:112 msgid ":func:`lgamma(x) `" @@ -551,6 +553,8 @@ msgid "" "Natural logarithm of the absolute value of the `Gamma function `_ at *x*" msgstr "" +"在 *x* 處的 `Gamma 函式 `_\\ 絕對值的自然對數" #: ../../library/math.rst:114 msgid "**Constants**" @@ -594,7 +598,7 @@ msgstr ":data:`nan`" #: ../../library/math.rst:120 msgid "\"Not a number\" (NaN)" -msgstr "" +msgstr "「非數值」(NaN)" #: ../../library/math.rst:125 msgid "Number-theoretic functions" @@ -630,7 +634,7 @@ msgstr "" #: ../../library/math.rst:147 msgid "Return factorial of the nonnegative integer *n*." -msgstr "" +msgstr "回傳非負整數 *n* 的階乘。" #: ../../library/math.rst:149 msgid "Floats with integral values (like ``5.0``) are no longer accepted." @@ -707,8 +711,7 @@ msgstr "" #: ../../library/math.rst:211 msgid "Floating point arithmetic" -msgstr "" -"計算傳入的 *iterable* 中所有元素的乘積。預設的乘積起始值 *start* 為 ``1``。" +msgstr "浮點數算術運算" #: ../../library/math.rst:215 msgid "" @@ -741,8 +744,8 @@ msgid "" "``float`` format. This operation often provides better accuracy than the " "direct expression ``(x * y) + z``." msgstr "" -"融合乘加運算。回傳 ``(x * y) + z``,用近似於無限精度及範圍的方式計算,而後一" -"次轉換為 ``float`` 格式。此操作通常能提供比運算式 ``(x * y) + z`` 更高的準確度。" +"融合乘加運算。回傳 ``(x * y) + z``,用近似於無限精密度及範圍的方式計算,而後一" +"次轉換為 ``float`` 格式。此操作通常能提供比運算式 ``(x * y) + z`` 更高的精確度。" #: ../../library/math.rst:239 msgid "" @@ -773,8 +776,8 @@ msgid "" msgstr "" "回傳 ``x / y`` 的浮點數餘數,其以平臺上的 C 函式庫 ``fmod(x, y)`` 函式定義。" "請注意此函式與 Python 運算式 ``x % y`` 可能不會回傳相同結果。C 標準要求 " -"``fmod(x, y)`` 的回傳值完全等同(數學定義上,即無限精度)於 ``x - n*y``,*n* " -"為可使回傳值與 *x* 同號且長度小於 ``abs(y)`` 的整數。Python 運算式 ``x % y`` " +"``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``,此值無法準確地表示成浮點數,並會四捨五入為出乎意料的 " @@ -853,14 +856,14 @@ msgid "" "(the same as the platform C double type), in which case any float *x* with " "``abs(x) >= 2**52`` necessarily has no fractional bits." msgstr "" -"使用 :func:`ceil`、:func:`floor` 及 :func:`modf` 三個函式時,請注意 *所有* 足" -"夠大的浮點數都是精確的整數。Python 的浮點數型別的精確度通常不會超過 53 位元" +"使用 :func:`ceil`、:func:`floor` 及 :func:`modf` 三個函式時,請注意\\ *所有*\\ 足" +"夠大的浮點數都是精確的整數。Python 的浮點數型別的精密度通常不會超過 53 位元" "(與 C 語言 double 型別相同),因此當浮點數 *x* 滿足 ``abs(x) >= 2**52`` 時," "它必然沒有小數部分。" #: ../../library/math.rst:313 msgid "Floating point manipulation functions" -msgstr "" +msgstr "浮點數操作函式" #: ../../library/math.rst:317 msgid "" @@ -868,7 +871,7 @@ msgid "" "*y*. On platforms that support signed zeros, ``copysign(1.0, -0.0)`` " "returns *-1.0*." msgstr "" -"回傳與 *x* 相同長度(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上," +"回傳與 *x* 相同量值(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上," "``copysign(1.0, -0.0)`` 回傳 *-1.0*。" #: ../../library/math.rst:324 @@ -930,6 +933,10 @@ msgid "" "and *rel_tol* less than ``1.0``. So add an appropriate positive *abs_tol* " "argument to the call." msgstr "" +"*abs_tol* 為絕對容許偏差;預設為 ``0.0`` 且必須不為負。當比較 ``x`` 與 " +"``0.0`` 時,``isclose(x, 0)`` 將計算為 ``abs(x) <= rel_tol * abs(x)``,此結果" +"對任何非零 ``x`` 及小於 ``1.0`` 的 *rel_tol* 而言皆為 ``False``。因此呼叫時應" +"加上適當的正數 *abs_tol* 引數。" #: ../../library/math.rst:356 msgid "" @@ -1066,7 +1073,7 @@ msgstr "" #: ../../library/math.rst:440 msgid "Power, exponential and logarithmic functions" -msgstr "" +msgstr "次方、指數與對數函式" #: ../../library/math.rst:444 msgid "Return the cube root of *x*." @@ -1078,6 +1085,8 @@ msgid "" "natural logarithms. This is usually more accurate than ``math.e ** x`` or " "``pow(math.e, x)``." msgstr "" +"回傳 *e* 的 *x* 次方,其中 *e* = 2.718281... 為自然對數的底數。此函式通常比 " +"``math.e ** x`` 或 ``pow(math.e, x)`` 更為精確。" #: ../../library/math.rst:458 msgid "Return *2* raised to the power *x*." @@ -1091,40 +1100,49 @@ msgid "" "wiki/Loss_of_significance>`_\\; the :func:`expm1` function provides a way to " "compute this quantity to full precision:" msgstr "" +"回傳 *e* 的 *x* 次方減 1。此處 *e* 為自然對數的底數。對於較小的浮點數 *x*," +"``exp(x) - 1`` 中的減法運算可能導致\\ `顯著的精密度損失 `_;:func:`expm1` 函式提供了一種能以完整精密度計算此值的方法:" #: ../../library/math.rst:482 msgid "With one argument, return the natural logarithm of *x* (to base *e*)." -msgstr "" +msgstr "傳入一個引數時,回傳 *x* 的自然對數(以 *e* 為底)。" #: ../../library/math.rst:484 msgid "" "With two arguments, return the logarithm of *x* to the given *base*, " "calculated as ``log(x)/log(base)``." msgstr "" +"傳入兩個引數時,回傳 *x* 以給定 *base* 為底的對數,計算方式為 " +"``log(x)/log(base)``。" #: ../../library/math.rst:490 msgid "" "Return the natural logarithm of *1+x* (base *e*). The result is calculated " "in a way which is accurate for *x* near zero." msgstr "" +"回傳 *1+x* 的自然對數(以 *e* 為底)。計算結果對於接近零的 *x* 值是精確的。" #: ../../library/math.rst:496 msgid "" "Return the base-2 logarithm of *x*. This is usually more accurate than " "``log(x, 2)``." msgstr "" +"回傳 *x* 的以 2 為底的對數。此函式通常比 ``log(x, 2)`` 更為精確。" #: ../../library/math.rst:503 msgid "" ":meth:`int.bit_length` returns the number of bits necessary to represent an " "integer in binary, excluding the sign and leading zeros." msgstr "" +":meth:`int.bit_length` 回傳以二進位表示一個整數所需的位元數,不包含正負號及前導零。" #: ../../library/math.rst:509 msgid "" "Return the base-10 logarithm of *x*. This is usually more accurate than " "``log(x, 10)``." msgstr "" +"回傳 *x* 的以 10 為底的對數。此函式通常比 ``log(x, 10)`` 更為精確。" #: ../../library/math.rst:515 msgid "" @@ -1134,6 +1152,9 @@ msgid "" "and *y* are finite, *x* is negative, and *y* is not an integer then ``pow(x, " "y)`` is undefined, and raises :exc:`ValueError`." msgstr "" +"回傳 *x* 的 *y* 次方。例外情況盡可能遵循 IEEE 754 標準。特別是,``pow(1.0, " +"x)`` 和 ``pow(x, 0.0)`` 總是回傳 ``1.0``,即使 *x* 是零或 NaN 也是如此。若 " +"*x* 和 *y* 皆為有限數、*x* 為負數且 *y* 不是整數,則 ``pow(x, y)`` 是未定義的,並會引發 :exc:`ValueError`。" #: ../../library/math.rst:522 msgid "" @@ -1141,6 +1162,8 @@ msgid "" "arguments to type :class:`float`. Use ``**`` or the built-in :func:`pow` " "function for computing exact integer powers." msgstr "" +"與內建 ``**`` 運算子不同,:func:`math.pow` 會將其兩個引數都轉換為 :class:`float` " +"型別。若需要計算精確的整數次方,請使用 ``**`` 或內建的 :func:`pow` 函式。" #: ../../library/math.rst:526 msgid "" @@ -1148,6 +1171,8 @@ msgid "" "return ``inf`` instead of raising :exc:`ValueError`, for consistency with " "IEEE 754." msgstr "" +"特殊情況 ``pow(0.0, -inf)`` 和 ``pow(-0.0, -inf)`` 已變更為回傳 ``inf`` 而非引發 " +":exc:`ValueError`,以符合 IEEE 754 標準。" #: ../../library/math.rst:534 msgid "Return the square root of *x*." @@ -1155,7 +1180,7 @@ msgstr "回傳 *x* 的平方根。" #: ../../library/math.rst:538 msgid "Summation and product functions" -msgstr "" +msgstr "總和與乘積函式" #: ../../library/math.rst:542 msgid "" @@ -1163,10 +1188,12 @@ msgid "" "a sequence (or iterable) of coordinates. The two points must have the same " "dimension." msgstr "" +"回傳兩點 *p* 與 *q* 之間的歐幾里得距離,各點以座標的序列(或可疊代物件)表示。" +"兩點必須具有相同的維度。" #: ../../library/math.rst:546 ../../library/math.rst:607 msgid "Roughly equivalent to::" -msgstr "約等價於:::" +msgstr "約等價於: ::" #: ../../library/math.rst:548 msgid "sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))" @@ -1178,7 +1205,7 @@ msgid "" "loss of precision by tracking multiple intermediate partial sums." msgstr "" "回傳可疊代物件(iterable)中所有值的精確浮點數和。透過追蹤過程中多個部分和" -"(partial sum)以避免精確度損失。" +"(partial sum)以避免精密度損失。" #: ../../library/math.rst:558 msgid "" @@ -1189,7 +1216,7 @@ msgid "" "least significant bit." msgstr "" "此演算法準確性奠基於保證 IEEE-754 浮點標準及典型奇進偶捨(half-even)模式。於" -"有些非 Windows 平台建置時,底層 C 函式庫使用延伸精度加法運算,而可能導致對過" +"有些非 Windows 平台建置時,底層 C 函式庫使用延伸精密度加法運算,而可能導致對過" "程中同一部分和重複捨入,並使其最低有效位不如預期。" #: ../../library/math.rst:564 @@ -1208,6 +1235,7 @@ msgid "" "the length of the vector from the origin to the point given by the " "coordinates." msgstr "" +"回傳歐幾里得範數 ``sqrt(sum(x**2 for x in coordinates))``。這是從原點到座標所給定的點之間的向量長度。" #: ../../library/math.rst:575 msgid "" @@ -1215,12 +1243,14 @@ msgid "" "hypotenuse of a right triangle using the Pythagorean theorem, ``sqrt(x*x + " "y*y)``." msgstr "" +"對於二維點 ``(x, y)``,這等同於使用畢氏定理計算直角三角形的斜邊,即 " +"``sqrt(x*x + y*y)``。" #: ../../library/math.rst:579 msgid "" "Added support for n-dimensional points. Formerly, only the two dimensional " "case was supported." -msgstr "" +msgstr "新增對 n 維點的支援。先前僅支援二維情況。" #: ../../library/math.rst:583 msgid "" @@ -1228,12 +1258,15 @@ msgid "" "(unit in the last place). More typically, the result is almost always " "correctly rounded to within 1/2 ulp." msgstr "" +"改進了演算法的精確度,使最大誤差低於 1 ulp(最後一位上的單位值)。更典型的情況是," +"結果幾乎總是能正確捨入到 1/2 ulp 以內。" #: ../../library/math.rst:591 msgid "" "Calculate the product of all the elements in the input *iterable*. The " "default *start* value for the product is ``1``." msgstr "" +"計算輸入 *iterable* 中所有元素的乘積。乘積的預設 *start* 起始值為 ``1``。" #: ../../library/math.rst:594 msgid "" @@ -1241,6 +1274,7 @@ msgid "" "intended specifically for use with numeric values and may reject non-numeric " "types." msgstr "" +"當可疊代物件為空時,回傳起始值。此函式專門設計用於數值運算,可能會拒絕非數值型別。" #: ../../library/math.rst:603 msgid "Return the sum of products of values from two iterables *p* and *q*." @@ -1259,42 +1293,42 @@ msgid "" "For float and mixed int/float inputs, the intermediate products and sums are " "computed with extended precision." msgstr "" -"對浮點數或混合整數及浮點數的傳入物件,其過程中的乘積及總和皆使用延伸精度計" +"對浮點數或混合整數及浮點數的傳入物件,其過程中的乘積及總和皆使用延伸精密度計" "算。" #: ../../library/math.rst:618 msgid "Angular conversion" -msgstr "" +msgstr "角度轉換" #: ../../library/math.rst:622 msgid "Convert angle *x* from radians to degrees." -msgstr "" +msgstr "將角度 *x* 從弧度轉換為度。" #: ../../library/math.rst:627 msgid "Convert angle *x* from degrees to radians." -msgstr "" +msgstr "將角度 *x* 從度轉換為弧度。" #: ../../library/math.rst:631 msgid "Trigonometric functions" -msgstr "" +msgstr "三角函式" #: ../../library/math.rst:635 msgid "" "Return the arc cosine of *x*, in radians. The result is between ``0`` and " "``pi``." -msgstr "" +msgstr "回傳 *x* 的反餘弦值,以弧度表示。結果介於 ``0`` 與 ``pi`` 之間。" #: ../../library/math.rst:641 msgid "" "Return the arc sine of *x*, in radians. The result is between ``-pi/2`` and " "``pi/2``." -msgstr "" +msgstr "回傳 *x* 的反正弦值,以弧度表示。結果介於 ``-pi/2`` 與 ``pi/2`` 之間。" #: ../../library/math.rst:647 msgid "" "Return the arc tangent of *x*, in radians. The result is between ``-pi/2`` " "and ``pi/2``." -msgstr "" +msgstr "回傳 *x* 的反正切值,以弧度表示。結果介於 ``-pi/2`` 與 ``pi/2`` 之間。" #: ../../library/math.rst:653 msgid "" @@ -1305,22 +1339,26 @@ msgid "" "for the angle. For example, ``atan(1)`` and ``atan2(1, 1)`` are both ``pi/" "4``, but ``atan2(-1, -1)`` is ``-3*pi/4``." msgstr "" +"回傳 ``atan(y / x)``,以弧度表示。結果介於 ``-pi`` 與 ``pi`` 之間。從原點到點 " +"``(x, y)`` 的平面向量與正 X 軸形成此角度。:func:`atan2` 的重點在於它知道兩個輸入的" +"正負號,因此能計算出角度所在的正確象限。例如,``atan(1)`` 和 ``atan2(1, 1)`` 都是 " +"``pi/4``,但 ``atan2(-1, -1)`` 是 ``-3*pi/4``。" #: ../../library/math.rst:663 msgid "Return the cosine of *x* radians." -msgstr "回傳 *x* 弧度的餘弦。" +msgstr "回傳 *x* 弧度的餘弦值。" #: ../../library/math.rst:668 msgid "Return the sine of *x* radians." -msgstr "回傳 *x* 弧度的正弦。" +msgstr "回傳 *x* 弧度的正弦值。" #: ../../library/math.rst:673 msgid "Return the tangent of *x* radians." -msgstr "回傳 *x* 弧度的正切。" +msgstr "回傳 *x* 弧度的正切值。" #: ../../library/math.rst:677 msgid "Hyperbolic functions" -msgstr "" +msgstr "雙曲函式" #: ../../library/math.rst:679 msgid "" @@ -1328,30 +1366,31 @@ msgid "" "are analogs of trigonometric functions that are based on hyperbolas instead " "of circles." msgstr "" +"`雙曲函式 `_\\ 是三角函式的類似物,但基於雙曲線而非圓。" #: ../../library/math.rst:685 msgid "Return the inverse hyperbolic cosine of *x*." -msgstr "回傳 *x* 的反雙曲餘弦。" +msgstr "回傳 *x* 的反雙曲餘弦值。" #: ../../library/math.rst:690 msgid "Return the inverse hyperbolic sine of *x*." -msgstr "回傳 *x* 的反雙曲正弦。" +msgstr "回傳 *x* 的反雙曲正弦值。" #: ../../library/math.rst:695 msgid "Return the inverse hyperbolic tangent of *x*." -msgstr "回傳 *x* 的反雙曲正切。" +msgstr "回傳 *x* 的反雙曲正切值。" #: ../../library/math.rst:700 msgid "Return the hyperbolic cosine of *x*." -msgstr "回傳 *x* 的雙曲餘弦。" +msgstr "回傳 *x* 的雙曲餘弦值。" #: ../../library/math.rst:705 msgid "Return the hyperbolic sine of *x*." -msgstr "回傳 *x* 的雙曲正弦。" +msgstr "回傳 *x* 的雙曲正弦值。" #: ../../library/math.rst:710 msgid "Return the hyperbolic tangent of *x*." -msgstr "回傳 *x* 的雙曲正切。" +msgstr "回傳 *x* 的雙曲正切值。" #: ../../library/math.rst:714 msgid "Special functions" @@ -1362,6 +1401,7 @@ msgid "" "Return the `error function `_ " "at *x*." msgstr "" +"回傳在 *x* 處的\\ `誤差函式 `_\\ 值。" #: ../../library/math.rst:721 msgid "" @@ -1369,6 +1409,8 @@ msgid "" "functions such as the `cumulative standard normal distribution `_::" msgstr "" +":func:`erf` 函式可用於計算傳統的統計函式,例如\\ `累積標準常態分布 `_: ::" #: ../../library/math.rst:725 msgid "" @@ -1376,6 +1418,9 @@ msgid "" " 'Cumulative distribution function for the standard normal distribution'\n" " return (1.0 + erf(x / sqrt(2.0))) / 2.0" msgstr "" +"def phi(x):\n" +" '標準常態分布的累積分布函式'\n" +" return (1.0 + erf(x / sqrt(2.0))) / 2.0" #: ../../library/math.rst:734 msgid "" @@ -1385,18 +1430,23 @@ msgid "" "from one would cause a `loss of significance `_\\." msgstr "" +"回傳在 *x* 處的互補誤差函式值。`互補誤差函式 `_\\ 定義為 ``1.0 - erf(x)``。此函式用於較大的 *x* 值,因為在該情況下" +"從一減去會導致\\ `顯著性損失 `_。" #: ../../library/math.rst:745 msgid "" "Return the `Gamma function `_ " "at *x*." msgstr "" +"回傳在 *x* 處的 `Gamma 函式 `_\\ 值。" #: ../../library/math.rst:753 msgid "" "Return the natural logarithm of the absolute value of the Gamma function at " "*x*." -msgstr "" +msgstr "回傳在 *x* 處 Gamma 函式絕對值的自然對數。" #: ../../library/math.rst:760 msgid "Constants" @@ -1404,11 +1454,11 @@ msgstr "常數" #: ../../library/math.rst:764 msgid "The mathematical constant *π* = 3.141592..., to available precision." -msgstr "" +msgstr "數學常數 *π* = 3.141592...,精確至可用精密度。" #: ../../library/math.rst:769 msgid "The mathematical constant *e* = 2.718281..., to available precision." -msgstr "" +msgstr "數學常數 *e* = 2.718281...,精確至可用精密度。" #: ../../library/math.rst:774 msgid "" @@ -1418,12 +1468,17 @@ msgid "" "(still) Wrong `_, and start celebrating `Tau " "day `_ by eating twice as much pie!" msgstr "" +"數學常數 *τ* = 6.283185...,精確至可用精密度。Tau 是一個圓常數,等於 2\\ *π*," +"即圓的周長與半徑的比值。若想了解更多關於 Tau 的資訊,請觀看 Vi Hart 的影片 " +"`Pi is (still) Wrong `_,並開始慶祝 `Tau 日 " +"`_,吃兩倍的派吧!" #: ../../library/math.rst:785 msgid "" "A floating-point positive infinity. (For negative infinity, use ``-" "math.inf``.) Equivalent to the output of ``float('inf')``." msgstr "" +"浮點數正無限值。(對於負無限值,請使用 ``-math.inf``。)等同於 ``float('inf')`` 的輸出。" #: ../../library/math.rst:793 msgid "" @@ -1434,10 +1489,14 @@ msgid "" "check whether a number is a NaN, use the :func:`isnan` function to test for " "NaNs instead of ``is`` or ``==``. Example:" msgstr "" +"浮點數「非數值」(NaN)值。等同於 ``float('nan')`` 的輸出。根據 `IEEE-754 標準 " +"`_\\ 的要求,``math.nan`` 和 " +"``float('nan')`` 不被認為等於任何其他數值,包括它們自身。若要檢查一個數是否為 " +"NaN,請使用 :func:`isnan` 函式而非 ``is`` 或 ``==``。範例:" #: ../../library/math.rst:813 msgid "It is now always available." -msgstr "" +msgstr "現在總是可用。" #: ../../library/math.rst:819 msgid "" @@ -1453,6 +1512,13 @@ msgid "" "there are some exceptions to this rule, for example ``pow(float('nan'), " "0.0)`` or ``hypot(float('nan'), float('inf'))``." msgstr "" +":mod:`math` 模組大部分由平臺 C 數學函式庫的輕量包裝函式組成。例外情況下的行為在適當" +"時遵循 C99 標準的附錄 F。目前的實作會對無效操作(如 ``sqrt(-1.0)`` 或 " +"``log(0.0)``,C99 附錄 F 建議發出無效操作或除以零的訊號)引發 :exc:`ValueError`,並" +"對溢位結果(例如 ``exp(1000.0)``)引發 :exc:`OverflowError`。除非一個或多個輸入引數" +"是 NaN,否則上述函式不會回傳 NaN;在該情況下,大多數函式會回傳 NaN,但(同樣遵循 " +"C99 附錄 F)此規則有一些例外,例如 ``pow(float('nan'), 0.0)`` 或 " +"``hypot(float('nan'), float('inf'))``。" #: ../../library/math.rst:831 msgid "" @@ -1460,6 +1526,8 @@ msgid "" "NaNs, and behavior for signaling NaNs remains unspecified. Typical behavior " "is to treat all NaNs as though they were quiet." msgstr "" +"請注意,Python 不會區分訊號型 NaN(signaling NaN)與安靜型 NaN(quiet NaN),且訊號型 " +"NaN 的行為仍未指定。典型的行為是將所有 NaN 視為安靜型 NaN。" #: ../../library/math.rst:838 msgid "Module :mod:`cmath`" @@ -1467,4 +1535,4 @@ msgstr ":mod:`cmath` 模組" #: ../../library/math.rst:839 msgid "Complex number versions of many of these functions." -msgstr "" +msgstr "這些函式的複數版本。"