| Information | First Generation Burn |
Second Generation Burn |
|---|---|---|
| 00 | 000 | 111 |
| 01 | 001 | 110 |
| 10 | 010 | 101 |
| 11 | 100 | 011 |
| The 3-bit stored value
< a , b , c >
represents the 2-bit value < a ⊕ b , a ⊕ c >, where ⊕ is exclusive-or. |
partition(A, p, r) |
int[] A = new int[100];
// 100 distinct ints are already
// inserted into A
int[] B = new int[75];
insert(A, B);
void insert(int[] A, int[] B) {
for (int i = 0; i < 75; i++) {
// Random(a,b) returns
// random int r, a<=r<=b
B[i] = A[Random(0,99)];
}
} | int A[100];
// 100 distinct ints are already
// inserted into A
int B[75];
insert(A, B);
void insert(int A[], int B[]) {
int i;
for (i = 0; i < 75; i++) {
// Random(a,b) returns
// random int r, a<=r<=b
B[i] = A[Random(0,99)];
}
} |
x = input double, m = floor(x) * = node value
* - m
x --------------------> x0 = x - m
| |
| |
| |
| |
* | | *
2 | | 2
| |
| |
| |
V V
x x0 (x - m) x / m
2 <--------------------- 2 = 2 = 2 / 2
m
* (times) 2
|
6.5 = input double, 6 = floor(6.5) * = node value
* - 6
6.5 --------------------> 0.5 = 6.5 - 6
| |
| |
| |
| |
* | | *
2 | | 2
| |
| |
| |
V V
6.5 0.5 (6.5 - 6) 6.5 / 6
2 <---------------------- 2 = 2 = 2 / 2
6
* (times) 2
Here 26.5 is computed by
normalizing 6.5 to 0.5, calculating 20.5,
and denormalizing by multiplying by 26 = 64.
Thus 26.5 = 20.5 (times) 26.
We would use a series to calculate 20.5, and
just as before, we only need to calculate 2x
for 0 <= x <= 1. For very large x or for negative
x with large absolute value, the series wouldn't work, so
this normalization is necessary. Finally, we would get
20.5 = 1.41421356 (using the series), and
26.5 = 1.41421356 * 64 = 90.50966799
(using the normalization/denormalization).
(In at least some places, this is the way 2x
is actually calculated.)
|