From Jason Turner

[rand.adapt.ibits]

Diff to HTML by rtfpessoa

tmp/tmp12k4adpp/{from.md → to.md} RENAMED
@@ -8,10 +8,17 @@ state eᵢ of its base engine `e`; the size of the state is the size of
8
  e’s state.
9
 
10
  The transition and generation algorithms are described in terms of the
11
  following integral constants:
12
 
 
 
 
 
 
 
 
13
  [*Note 1*: The relation w = n₀ w₀ + (n - n₀)(w₀ + 1) always
14
  holds. — *end note*]
15
 
16
  The transition algorithm is carried out by invoking `e()` as often as
17
  needed to obtain n₀ values less than y₀ + `e.min()` and n - n₀ values
 
8
  e’s state.
9
 
10
  The transition and generation algorithms are described in terms of the
11
  following integral constants:
12
 
13
+ - Let R = `e.max() - e.min() + 1` and m = ⌊ log₂ R ⌋.
14
+ - With n as determined below, let w₀ = ⌊ w / n ⌋, n₀ = n - w mod n,
15
+ $y_0 = 2^{w_0} \left\lfloor R / 2^{w_0} \right\rfloor$, and
16
+ $y_1 = 2^{w_0 + 1} \left\lfloor R / 2^{w_0 + 1} \right\rfloor$.
17
+ - Let n = ⌈ w / m ⌉ if and only if the relation R - y₀ ≤ ⌊ y₀ / n ⌋
18
+ holds as a result. Otherwise let n = 1 + ⌈ w / m ⌉.
19
+
20
  [*Note 1*: The relation w = n₀ w₀ + (n - n₀)(w₀ + 1) always
21
  holds. — *end note*]
22
 
23
  The transition algorithm is carried out by invoking `e()` as often as
24
  needed to obtain n₀ values less than y₀ + `e.min()` and n - n₀ values