0

Consider the System $±(.a_1a_2a_3...a_t)_N.N^{e}$ with $0\le a_i\le N-1$, $a_1≠0$ $e\in[e_{min},e_{max}]$. Let $N=8$, length of the mantissa $t=9$ and $e_{min}=-15$, $e_{max}=15$

How many numbers are in this System ?

I mean, we have to find out the greatest and the smallest positive number and multiply the difference by 2.

the biggest positive is $.777777777\times 8^{15}=\frac{7}{8}+\frac{7}{64}+...\times 8^{15}=7\cdot 8^{14}+7\cdot 8^{13}+...$

the smallest positive is; $.100000000\times 8^{-15}=8^{-16}$

we subtract this form this first one add 1 and multiply by 2, am I wrong ?

OBDA
  • 1,715

1 Answers1

1

If you do what the OP suggests (i.e., subtract $.100000000\times8^{-15}$ from $.777777777\times8^{15}$), you don't get an integer. A correct approach is simply to count the number of choices for each term. You have $7$ choices for $a_1$ (since it can't be $0$), $8$ choices for each of $a_2$ through $a_9$, $31$ choices for $e$, and, finally, two choices of sign, for a total of

$$7\cdot8^{8}\cdot31\cdot2=7{,}281{,}311{,}744$$

different numbers

Barry Cipra
  • 79,832