-
Notifications
You must be signed in to change notification settings - Fork 104
Description
In Section 3.4 of your PLDI paper you write:
For each possible value of e2 that is greater than or equal to zero, we determine q as max (0, floor(e2 log10(2)) − 1) (Lemma 3.2), and then use B0 to determine a legal value for k as (B0 + floor(log2(5^q))) (Lemma 3.3). We compute (floor(2^k/5^q) + 1) using arbitrary precision arithmetic --- its result has no more than B0 bits --- and store it in a lookup table TABLE_GTE indexed by q.
For e2 == 0, q must be 0..
Thus, 5^q must be 1, and log2(5^0)) is 0,
so k == (B0 + log2(5^0)) == (B0 + log2(1)) == B0.
Therefore, when e2 == 0, we have q == 0, and k == B0.
Now consider how many bits there must be in floor(2^k / 5^q) + 1 when q == 0 and k == B0:
floor(2^k / 5^q ) + 1 == floor(2^B0 / 1) + 1
== 2^B0 + 1.
The number of bits in 2^B0 + 1 is B0 + 1.
However, this contradicts the statement that the result of floor(2^k . 5^q) + 1 "has no more bits than B0", since we need B0 + 1 bits for the case when e2 == 0.
Can you explain what you mean?
Thanks!