diff --git a/library/random.po b/library/random.po index 1c42b42c95..5df7621a0a 100644 --- a/library/random.po +++ b/library/random.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2021-12-06 20:10+0800\n" +"PO-Revision-Date: 2021-12-17 16:35+0800\n" "Last-Translator: Allen Wu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0\n" +"X-Generator: Poedit 3.0.1\n" #: ../../library/random.rst:2 msgid ":mod:`random` --- Generate pseudo-random numbers" @@ -104,7 +104,7 @@ msgid "" "uses the system function :func:`os.urandom` to generate random numbers from " "sources provided by the operating system." msgstr "" -":mod:`random` module 也提供了 :class:`SystemRandom` class,使用系統函數 :" +":mod:`random` module 也提供了 :class:`SystemRandom` class,使用系統函式 :" "func:`os.urandom` 從作業系統提供的來源產生隨機數。" #: ../../library/random.rst:48 @@ -187,8 +187,8 @@ msgid "" "class:`int`, :class:`float`, :class:`str`, :class:`bytes`, or :class:" "`bytearray`." msgstr "" -"將來,*seed* 必須是以下型別之一:*NoneType*、:class:`int`、:class:`float`、:" -"class:`str`、:class:`bytes` 或 :class:`bytearray`。" +"將來,*seed* 必須是以下型別之一:\\ *NoneType*、\\ :class:`int`、\\ :class:" +"`float`、\\ :class:`str`、\\ :class:`bytes`、\\ :class:`bytearray`。" #: ../../library/random.rst:96 msgid "" @@ -209,21 +209,22 @@ msgstr "" #: ../../library/random.rst:108 msgid "Functions for bytes" -msgstr "" +msgstr "回傳位元組的函式" #: ../../library/random.rst:112 msgid "Generate *n* random bytes." -msgstr "" +msgstr "產生 *n* 個隨機位元組。" #: ../../library/random.rst:114 msgid "" "This method should not be used for generating security tokens. Use :func:" "`secrets.token_bytes` instead." msgstr "" +"此方法不應使用於產生安全性權杖 (Token)。請改用 :func:`secrets.token_bytes`。" #: ../../library/random.rst:121 msgid "Functions for integers" -msgstr "" +msgstr "回傳整數的函式" #: ../../library/random.rst:126 msgid "" @@ -231,6 +232,8 @@ msgid "" "is equivalent to ``choice(range(start, stop, step))``, but doesn't actually " "build a range object." msgstr "" +"從 ``range(start, stop, step)`` 中回傳一個隨機選擇的元素。這等效於 " +"``choice(range(start, stop, step))``,但實際上並沒有構建範圍物件。" #: ../../library/random.rst:130 msgid "" @@ -238,6 +241,8 @@ msgid "" "arguments should not be used because the function may use them in unexpected " "ways." msgstr "" +"位置引數模式與 :func:`range` 的位置引數模式匹配。不應使用關鍵字引數,因為函式" +"可能會以不預期的方式使用它們。" #: ../../library/random.rst:133 msgid "" @@ -245,6 +250,8 @@ msgid "" "values. Formerly it used a style like ``int(random()*n)`` which could " "produce slightly uneven distributions." msgstr "" +":meth:`randrange` 在產生均勻分佈的值方面更為複雜。以前,它使用像 " +"``int(random()*n)`` 這樣的樣式,這可能會產生稍微不均勻的分佈。" #: ../../library/random.rst:138 msgid "" @@ -252,6 +259,8 @@ msgid "" "deprecated. Currently ``randrange(10.0)`` is losslessly converted to " "``randrange(10)``. In the future, this will raise a :exc:`TypeError`." msgstr "" +"非整數類型到等效整數的自動轉換已被棄用。目前 ``randrange(10.0)`` 被無損轉換" +"為 ``randrange(10)``。將來,這將會引發 :exc:`TypeError`。" #: ../../library/random.rst:143 msgid "" @@ -259,12 +268,15 @@ msgid "" "``randrange('10')`` will be changed from :exc:`ValueError` to :exc:" "`TypeError`." msgstr "" +"對於非整數值,例如 ``randrange(10.5)`` 或 ``randrange('10')``,引發的例外將" +"從 :exc:`ValueError` 改為 :exc:`TypeError`。" #: ../../library/random.rst:150 msgid "" "Return a random integer *N* such that ``a <= N <= b``. Alias for " "``randrange(a, b+1)``." msgstr "" +"回傳一個隨機整數 *N*,使得 ``a <= N <= b``。為 ``randrange(a, b+1)`` 的別名。" #: ../../library/random.rst:155 msgid "" @@ -273,26 +285,33 @@ msgid "" "also provide it as an optional part of the API. When available, :meth:" "`getrandbits` enables :meth:`randrange` to handle arbitrarily large ranges." msgstr "" +"回傳一個具有 *k* 個隨機位元的非負 Python 整數。此方法會隨 MersenneTwister 產" +"生器一起提供,一些其他的產生器也可能將其作為 API 的可選部分。如果可用,\\ :" +"meth:`getrandbits` 使 :meth:`randrange` 能夠處理任意大的範圍。" #: ../../library/random.rst:161 msgid "This method now accepts zero for *k*." -msgstr "" +msgstr "此方法現在接受 *k* 為零。" #: ../../library/random.rst:166 msgid "Functions for sequences" -msgstr "" +msgstr "回傳序列的函式" #: ../../library/random.rst:170 msgid "" "Return a random element from the non-empty sequence *seq*. If *seq* is " "empty, raises :exc:`IndexError`." msgstr "" +"從非空序列 *seq* 回傳一個隨機元素。如果 *seq* 為空,則引發 :exc:" +"`IndexError`。" #: ../../library/random.rst:175 msgid "" "Return a *k* sized list of elements chosen from the *population* with " "replacement. If the *population* is empty, raises :exc:`IndexError`." msgstr "" +"回傳從 *population* 中重置取樣出的一個大小為 *k* 的元素 list。如果 " +"*population* 為空,則引發 :exc:`IndexError`。" #: ../../library/random.rst:178 msgid "" @@ -304,6 +323,11 @@ msgid "" "50]``. Internally, the relative weights are converted to cumulative weights " "before making selections, so supplying the cumulative weights saves work." msgstr "" +"如果指定了 *weights* 序列,則根據相對權重進行選擇。另外,如果給定 " +"*cum_weights* 序列,則根據累積權重進行選擇(可能使用 :func:`itertools." +"accumulate` 計算)。例如,相對權重 ``[10, 5, 30, 5]`` 等同於累積權重 ``[10, " +"15, 45, 50]``。在內部,相對權重在進行選擇之前會轉換為累積權重,因此提供累積權" +"重可以節省工作。" #: ../../library/random.rst:187 msgid "" @@ -312,6 +336,9 @@ msgid "" "same length as the *population* sequence. It is a :exc:`TypeError` to " "specify both *weights* and *cum_weights*." msgstr "" +"如果既未指定 *weights* 也未指定 *cum_weights*,則以相等的機率進行選擇。如果提" +"供了加權序列,則該序列的長度必須與 *population* 序列的長度相同。它是一個 :" +"exc:`TypeError` 來指定 *weights* 和 *cum_weights*。" #: ../../library/random.rst:192 msgid "" @@ -321,6 +348,10 @@ msgid "" "to be non-negative and finite. A :exc:`ValueError` is raised if all weights " "are zero." msgstr "" +"*weights* 或 *cum_weights* 可以使用任何與 :func:`random` 所回傳的 :class:" +"`float` 值(包括整數、float 和分數,但不包括小數)交互操作 (interoperates) 的" +"數值類型。權重假定為非負數和有限的。如果所有權重均為零,則引發 :exc:" +"`ValueError`。" #: ../../library/random.rst:198 msgid "" @@ -331,26 +362,34 @@ msgid "" "`choice` defaults to integer arithmetic with repeated selections to avoid " "small biases from round-off error." msgstr "" +"對於給定的種子,具有相等權重的 :func:`choices` 函式通常產生與重複呼叫 :func:" +"`choice` 不同的序列。:func:`choices` 使用的演算法使用浮點院算來實現內部一致性" +"和速度。:func:`choice` 使用的演算法預設為整數運算和重複選擇,以避免捨入誤差產" +"生的小偏差。" #: ../../library/random.rst:207 msgid "Raises a :exc:`ValueError` if all weights are zero." -msgstr "" +msgstr "如果所有權重均為零,則引發 :exc:`ValueError`。" #: ../../library/random.rst:213 msgid "Shuffle the sequence *x* in place." -msgstr "" +msgstr "將序列 *x* 原地 (in place) 隨機打亂位置。" #: ../../library/random.rst:215 msgid "" "The optional argument *random* is a 0-argument function returning a random " "float in [0.0, 1.0); by default, this is the function :func:`.random`." msgstr "" +"選擇性引數 *random* 是一個 0 引數函式,回傳一個在 [0.0, 1.0) 之間的隨機 " +"float;預設情況下,這是函式 :func:`.random`。" #: ../../library/random.rst:218 msgid "" "To shuffle an immutable sequence and return a new shuffled list, use " "``sample(x, k=len(x))`` instead." msgstr "" +"要打亂一個不可變的序列並回傳一個新的被打亂的 list(串列),請使用 " +"``sample(x, k=len(x))``。" #: ../../library/random.rst:221 msgid "" @@ -360,16 +399,21 @@ msgid "" "generated. For example, a sequence of length 2080 is the largest that can " "fit within the period of the Mersenne Twister random number generator." msgstr "" +"請注意,即使對於較小的 ``len(x)``,*x* 的置換總數也會快速成長到大於大多數隨機" +"數產生器的週期。這意味著長序列的大多數置換永遠無法產生。例如,長度為 2080 的" +"序列是 Mersenne Twister 隨機數產生器週期內可以容納的最大序列。" #: ../../library/random.rst:228 msgid "The optional parameter *random*." -msgstr "" +msgstr "選擇性參數 *random*。" #: ../../library/random.rst:233 msgid "" "Return a *k* length list of unique elements chosen from the population " "sequence or set. Used for random sampling without replacement." msgstr "" +"回傳從母體序列或集合中選擇出的一個包含獨特元素、長度為 *k* 的 list。用於不重" +"置的隨機取樣。" #: ../../library/random.rst:236 msgid "" @@ -379,6 +423,9 @@ msgid "" "winners (the sample) to be partitioned into grand prize and second place " "winners (the subslices)." msgstr "" +"回傳包含母體元素的新清單,同時保持原始母體不變。產生的清單按選擇順序排列,因" +"此所有子切片也會是有效的隨機樣本。這允許抽獎獲獎者(樣本)分為大獎和第二名獲" +"獎者(子切片)。" #: ../../library/random.rst:242 msgid "" @@ -386,6 +433,8 @@ msgid "" "population contains repeats, then each occurrence is a possible selection in " "the sample." msgstr "" +"母體成員不必是 :term:`hashable` 或唯一的。如果母體包含重複項,則每次出現都是" +"樣本中可能出現的一個選擇。" #: ../../library/random.rst:245 msgid "" @@ -394,6 +443,9 @@ msgid "" "counts=[4, 2], k=5)`` is equivalent to ``sample(['red', 'red', 'red', 'red', " "'blue', 'blue'], k=5)``." msgstr "" +"可以一次指定一個重複元素,也可以使用可選的僅關鍵字 *counts* 參數指定重複元" +"素。例如 ``sample(['red', 'blue'], counts=[4, 2], k=5)`` 等同於 " +"``sample(['red', 'red', 'red', 'red', 'blue', 'blue'], k=5)``。" #: ../../library/random.rst:250 msgid "" @@ -401,12 +453,14 @@ msgid "" "an argument. This is especially fast and space efficient for sampling from " "a large population: ``sample(range(10000000), k=60)``." msgstr "" +"若要從整數範圍中選擇範例,請使用 :func:`range` 物件作為引數。這對於從大型母體" +"中取樣特別快速且節省空間:\\ ``sample(range(10000000), k=60)``。" #: ../../library/random.rst:254 msgid "" "If the sample size is larger than the population size, a :exc:`ValueError` " "is raised." -msgstr "" +msgstr "如果樣本大小大於母體大小,:exc:`ValueError` 會被引發。" #: ../../library/random.rst:257 msgid "Added the *counts* parameter." @@ -419,10 +473,13 @@ msgid "" "`list` or :class:`tuple`, preferably in a deterministic order so that the " "sample is reproducible." msgstr "" +"將來,*population* 必須是一個序列。不再支援 :class:`set` 的實例。必須先將集合" +"轉換為 :class:`list` 或 :class:`tuple`,最好是按確定性順序,以便取樣是可復現" +"的。" #: ../../library/random.rst:270 msgid "Real-valued distributions" -msgstr "" +msgstr "實數分布" #: ../../library/random.rst:272 msgid "" @@ -431,22 +488,28 @@ msgid "" "distribution's equation, as used in common mathematical practice; most of " "these equations can be found in any statistics text." msgstr "" +"以下函式產生特定的實數分佈。函式參數以分佈方程中的對應變數命名,如常見的數學" +"實踐所示;這些方程式中的大多數都可以在任意統計文本中找到。" #: ../../library/random.rst:280 msgid "Return the next random floating point number in the range [0.0, 1.0)." -msgstr "" +msgstr "回傳範圍 [0.0, 1.0) 中的下一個隨機浮點數。" #: ../../library/random.rst:285 msgid "" "Return a random floating point number *N* such that ``a <= N <= b`` for ``a " "<= b`` and ``b <= N <= a`` for ``b < a``." msgstr "" +"回傳一個隨機浮點數 *N*,當 ``a <= b`` 時確保 N 為 ``a <= N <= b`` 、``b < " +"a`` 時確保 N 為 ``b <= N <= a``。" #: ../../library/random.rst:288 msgid "" "The end-point value ``b`` may or may not be included in the range depending " "on floating-point rounding in the equation ``a + (b-a) * random()``." msgstr "" +"終點值 ``b`` 可能包含在範圍內,也可能不包含在範圍內,取決於方程式 ``a + (b-" +"a) * random()`` 中的浮點捨入。" #: ../../library/random.rst:294 msgid "" @@ -455,12 +518,17 @@ msgid "" "default to zero and one. The *mode* argument defaults to the midpoint " "between the bounds, giving a symmetric distribution." msgstr "" +"回傳一個隨機浮點數 *N*,使得 ``low <= N <= high``,並在這些邊界之間具有指定" +"的 *mode*。*low* 和 *high* 邊界預設為零和一。*mode* 引數預設為邊界之間的中" +"點,從而給出對稱分佈。" #: ../../library/random.rst:302 msgid "" "Beta distribution. Conditions on the parameters are ``alpha > 0`` and " "``beta > 0``. Returned values range between 0 and 1." msgstr "" +"Beta(貝它)分布。參數的條件為 ``alpha > 0`` 和 ``beta > 0``。回傳值的範圍介" +"於 0 和 1 之間。" #: ../../library/random.rst:308 msgid "" @@ -470,16 +538,24 @@ msgid "" "if *lambd* is positive, and from negative infinity to 0 if *lambd* is " "negative." msgstr "" +"指數分佈。*lambd* 為 1.0 除以所需的平均數。它應該不為零。(該參數將被稱為 " +"\"lambda\",但這是 Python 中的保留字)如果 *lambd* 為正,則回傳值的範圍從 0 " +"到正無窮大;如果 *lambd* 為負,則回傳值的範圍從負無窮大到 0。" #: ../../library/random.rst:317 msgid "" "Gamma distribution. (*Not* the gamma function!) Conditions on the " "parameters are ``alpha > 0`` and ``beta > 0``." msgstr "" +"Gamma(伽瑪)分佈。(*不是* Gamma 函式!)參數的條件為 ``alpha > 0`` 和 " +"``beta > 0``。" #: ../../library/random.rst:320 msgid "The probability distribution function is::" msgstr "" +"Probability distribution function(機率密度函式)是:\n" +"\n" +"::" #: ../../library/random.rst:329 msgid "" @@ -487,6 +563,8 @@ msgid "" "mean, and *sigma* is the standard deviation. This is slightly faster than " "the :func:`normalvariate` function defined below." msgstr "" +"常態分佈,也稱為高斯分佈。*mu* 是平均數,*sigma* 是標準差。這比下面定義的 :" +"func:`normalvariate` 函式快一點。" #: ../../library/random.rst:333 msgid "" @@ -496,6 +574,9 @@ msgid "" "random number generator. 2) Put locks around all calls. 3) Use the slower, " "but thread-safe :func:`normalvariate` function instead." msgstr "" +"多執行緒須注意:當兩個執行緒同時呼叫此函式時,它們可能會收到相同的傳回值。這" +"可以透過三種方式避免。1)讓每個執行緒使用隨機數產生器的不同實例。2)在所有呼" +"叫周圍加鎖。3)使用較慢但執行緒安全的 :func:`normalvariate` 函式代替。" #: ../../library/random.rst:343 msgid "" @@ -504,12 +585,14 @@ msgid "" "deviation *sigma*. *mu* can have any value, and *sigma* must be greater " "than zero." msgstr "" +"對數常態分佈。如果你取此分佈的自然對數,你將獲得一個具有平均數 *mu* 和標準差 " +"*sigma* 的常態分佈。*mu* 可以為任何值,並且 *sigma* 必須大於零。" #: ../../library/random.rst:351 msgid "" "Normal distribution. *mu* is the mean, and *sigma* is the standard " "deviation." -msgstr "" +msgstr "常態分佈。*mu* 是平均數,*sigma* 是標準差。" #: ../../library/random.rst:356 msgid "" @@ -518,26 +601,30 @@ msgid "" "to zero. If *kappa* is equal to zero, this distribution reduces to a " "uniform random angle over the range 0 to 2\\*\\ *pi*." msgstr "" +"*mu* 是平均角度,以 0 到 2\\*\\ *pi* 之間的弧度表示,*kappa* 是濃度參數,必須" +"大於或等於零。如果 *kappa* 等於零,則此分佈在 0 到 2\\*\\ *pi* 的範圍內將減小" +"為均勻的隨機角度。" #: ../../library/random.rst:364 msgid "Pareto distribution. *alpha* is the shape parameter." -msgstr "" +msgstr "Pareto distribution(柏拉圖分佈)。*alpha* 是形狀參數。" #: ../../library/random.rst:369 msgid "" "Weibull distribution. *alpha* is the scale parameter and *beta* is the " "shape parameter." msgstr "" +"Weibull distribution(韋伯分佈)。*alpha* 是比例參數,*beta* 是形狀參數。" #: ../../library/random.rst:374 msgid "Alternative Generator" -msgstr "" +msgstr "替代產生器" #: ../../library/random.rst:378 msgid "" "Class that implements the default pseudo-random number generator used by " "the :mod:`random` module." -msgstr "" +msgstr "實現 :mod:`random` 模組使用的預設偽隨機數產生器的 class。" #: ../../library/random.rst:381 msgid "" @@ -545,6 +632,8 @@ msgid "" "`NoneType`, :class:`int`, :class:`float`, :class:`str`, :class:`bytes`, or :" "class:`bytearray`." msgstr "" +"將來,*seed* 必須是以下類型之一:\\ :class:`NoneType`、\\ :class:`int`、\\ :" +"class:`float`、\\ :class:`str`、\\ :class:`bytes`、\\ :class:`bytearray`。" #: ../../library/random.rst:388 msgid "" @@ -555,10 +644,14 @@ msgid "" "ignored. The :meth:`getstate` and :meth:`setstate` methods raise :exc:" "`NotImplementedError` if called." msgstr "" +"使用 :func:`os.urandom` 函式從作業系統提供的來源產生隨機數的 Class。並非在所" +"有系統上都可用。不依賴於軟體狀態,並且序列不可復現。因此 :meth:`seed` 方法沒" +"有效果且被忽略。如果呼叫 :meth:`getstate` 和 :meth:`setstate` 方法會引發 :" +"exc:`NotImplementedError`。" #: ../../library/random.rst:397 msgid "Notes on Reproducibility" -msgstr "" +msgstr "關於 Reproducibility(復現性)的注意事項" #: ../../library/random.rst:399 msgid "" @@ -567,24 +660,30 @@ msgid "" "should be reproducible from run to run as long as multiple threads are not " "running." msgstr "" +"有時,能夠重現偽隨機數產生器給出的序列很有用。只要多執行緒未運行,透過重複使" +"用種子值,同一序列就應該可以被復現。" #: ../../library/random.rst:403 msgid "" "Most of the random module's algorithms and seeding functions are subject to " "change across Python versions, but two aspects are guaranteed not to change:" msgstr "" +"大多數隨機 module 的演算法和 seed 設定函式在 Python 版本中可能會發生變化,但" +"可以保證兩個方面不會改變:" #: ../../library/random.rst:406 msgid "" "If a new seeding method is added, then a backward compatible seeder will be " "offered." -msgstr "" +msgstr "如果增加了新的 seed 設定函式,則將提供向後相容的播種器 (seeder)。" #: ../../library/random.rst:409 msgid "" "The generator's :meth:`~Random.random` method will continue to produce the " "same sequence when the compatible seeder is given the same seed." msgstr "" +"當相容的播種器被賦予相同的種子時,產生器的 :meth:`~Random.random` 方法將持續" +"產生相同的序列。" #: ../../library/random.rst:415 msgid "Examples" @@ -610,6 +709,11 @@ msgid "" "Bootstrapping_(statistics)>`_ using resampling with replacement to estimate " "a confidence interval for the mean of a sample::" msgstr "" +"`統計 bootstrapping(自助法) `_\\ 的範例,使用有重置的重新取樣來估計樣本平均數" +"的信賴區間:\n" +"\n" +"::" #: ../../library/random.rst:486 msgid "" @@ -618,11 +722,20 @@ msgid "" "significance or `p-value `_ of an " "observed difference between the effects of a drug versus a placebo::" msgstr "" +"`重新取樣排列測試 `_\\ 的範例,來確定觀察到的藥物與安" +"慰劑之間差異的統計學意義或 `p 值 `_" +"\\ :\n" +"\n" +"::" #: ../../library/random.rst:513 msgid "" "Simulation of arrival times and service deliveries for a multiserver queue::" msgstr "" +"模擬多伺服器佇列 (queue) 的到達時間與服務交付:\n" +"\n" +"::" #: ../../library/random.rst:542 msgid "" @@ -631,6 +744,9 @@ msgid "" "profile/295/>`_ on statistical analysis using just a few fundamental " "concepts including simulation, sampling, shuffling, and cross-validation." msgstr "" +"`Statistics for Hackers `_ 是由 " +"`Jake Vanderplas `_ 製作的教" +"學影片,僅使用幾個基本概念(包括模擬、取樣、洗牌、交叉驗證)進行統計分析。" #: ../../library/random.rst:548 msgid "" @@ -640,6 +756,10 @@ msgid "" "distributions provided by this module (gauss, uniform, sample, betavariate, " "choice, triangular, and randrange)." msgstr "" +"`Economics Simulation `_\\ 是由 `Peter Norvig `_ 對市場" +"進行的模擬,顯示了該模組提供的許多工具和分佈(高斯、均勻、樣本、 beta 變數、" +"選擇,三角形、隨機數)的有效使用。" #: ../../library/random.rst:555 msgid "" @@ -649,10 +769,14 @@ msgid "" "theory, how to write simulations, and how to perform data analysis using " "Python." msgstr "" +"`機率的具體介紹(使用Python) `_\\ 為 `Peter Norvig `_ 的教學課程,涵蓋了機率理論的基礎知識與如何模擬以及使用 Python 執行數" +"據分析。" #: ../../library/random.rst:563 msgid "Recipes" -msgstr "" +msgstr "使用方案" #: ../../library/random.rst:565 msgid "" @@ -662,6 +786,9 @@ msgid "" "are not possible selections. For example, ``0.05954861408025609`` isn't an " "integer multiple of 2⁻⁵³." msgstr "" +"預設的 :func:`.random` 回傳 *0.0 ≤ x < 1.0* 範圍內 2⁻⁵³ 的倍數。所有數字都是" +"均勻分佈的,並且可以完全表示為 Python float。但是,該間隔中的許多其他可表示" +"的 float 不是可能的選擇。 例如 ``0.05954861408025609`` 不是 2⁻⁵³ 的整數倍。" #: ../../library/random.rst:571 msgid "" @@ -671,12 +798,19 @@ msgid "" "geometric distribution where exponents smaller than *-53* occur half as " "often as the next larger exponent." msgstr "" +"以下範例採用不同的方法。間隔中的所有 float 都是可能的選擇。尾數來自 *2⁵² ≤ 尾" +"數 < 2⁵³* 範圍內的整數均勻分佈。指數來自幾何分佈,其中小於 *-53* 的指數的出現" +"頻率是下一個較大指數的一半。" #: ../../library/random.rst:593 msgid "" "All :ref:`real valued distributions ` in the " "class will use the new method::" msgstr "" +"Class 中的所有\\ :ref:`實數分佈 `\\ 都將使用新方" +"法:\n" +"\n" +"::" #: ../../library/random.rst:602 msgid "" @@ -686,6 +820,10 @@ msgid "" "Python float. (The value 2⁻¹⁰⁷⁴ is the smallest positive unnormalized float " "and is equal to ``math.ulp(0.0)``.)" msgstr "" +"該範例在概念上等效於一種演算法,該演算法從 *0.0 ≤ x < 1.0* 範圍內 2⁻¹⁰⁷⁴ 的所" +"有倍數中進行選擇。這些數字都是均勻分佈的,但大多數必須向下捨入到最接近的可表" +"示的 Python float。(2⁻¹⁰⁷⁴ 是最小為正的非正規化 float,等於 ``math." +"ulp(0.0)``)" #: ../../library/random.rst:611 msgid "" @@ -694,3 +832,6 @@ msgid "" "ways to generate more fine-grained floats than normally generated by :func:`." "random`." msgstr "" +"`產生偽隨機浮點值 `_ Allen B. Downey 的一篇論文描述了產生比通常由 :func:`.random` 產生的 " +"float 更 fine-grained(細粒的)的方法。"