In order for the significand of a rational number, which has the form
to be represented by an
The definition may be restated as follows.
The next three lemmas are consequences of the observation that
-exactness
of
is a property of
.
PROOF: By Lemma 4.1.11,
.
PROOF: By Lemma 4.1.12,
.
It is clear that is
is representable in a given field of bits, then
it is also representable in any wider field.
PROOF: Since
and
,
Any power of 2 has a 1-bit significand.
PROOF: By Lemma 4.1.3,
A bit vector is exact with respect to its width.
PROOF: Since 0 is
-exact for all
, we may assume
, and therefore
. Now since
, Lemma 4.1.2 implies
, and
hence
.
We have the following formula for the exactness of a product.
PROOF: If
and
are integers,
then by Lemma 4.1.13, so is
In particular, if
is
-exact, then
is
-exact. The converse
also holds.
PROOF: We shall require an elementary fact of arithmetic:
Now to show that
is
-exact, i.e.,
,
it will suffice to show that
But since
Exactness of a bit vector may be formulated in various ways.
|
(a) |
|
(b)
|
|
(c)
|
|
(d)
|
PROOF: The equivalence between (a) and (b) follows from Lemma 4.2.1, since
Now by Lemmas 2.2.11 and 2.2.19,
and hence
But by Lemma 2.2.1,
The next lemma gives a formula for exactness of a difference.
PROOF: Since
is
-exact and
,
by Lemma 4.2.1.. Similarly,
Lemma 4.2.12 is often applied with
, in the following
weaker form.
If
is positive and
-exact, then the least
-exact number exceeding
is computed as follows.
PROOF: Let
and
fp
. Since
is
-exact,
, and by Lemma 4.1.2,
. Thus,
which implies
PROOF: Let
and
fp
. Since
is
-exact,
. Similar, since
is
-exact,
. But
by
Corollary 4.1.4, and hence
as well. Now since
Thus,
PROOF: Since
, Lemma 4.1.4 implies
.
Therefore, we have
, which, according to Lemma 4.1.2,
implies
. On the other hand, since
is
-exact
by Lemma 4.2.6, Lemma 4.2.15 implies
.
PROOF: Since the case
is trivial, we shall assume that
and, without loss of generality, that
. But then by
Lemma 4.2.15,
Similarly, the following definition computes the greatest
-exact
number that is less than a given
-exact number.
PROOF: Let
and
fp
.
Suppose first that
. Then
, and since
Definition 4.1.1 implies
and
Now suppose
. Then by Lemma 4.2.14,
Now
which implies
PROOF: Let
fp
, and
fp
. We shall prove first that
fp
.
As noted in the proof of Lemma 4.2.18,
If
But if
Next, we prove that
fp
. Note that
.
If
, then
, and since
,
We may assume, therefore, that
PROOF: Suppose
fp
. Then since
fp
and
are both
-exact,
Lemma 4.2.14 implies
fp
fp
, a contradiction.