# On the cardinality of the set of numbers representable by a floating point system

I am new to numerical methods and I cannot think of a way to start solving the following problem. I know the mantissa, base and the boundaries are related when defining a number but I cannot really put it in together. The question is as follows and I need to know how these terms are related and how to approach a question regarding these.

Consider the floating point number set $\mathbb F \subset \mathbb R$ such that $\mathbb F( \beta,t,L,U)$. Here $\beta$ is the base, $t$ is the number of digits in the mantissa and $(L,U)$ is the range of variation of the exponent. Show that the set $\mathbb F$ contains precisely $2( \beta -1 )$ $\beta ^{t-1} (U-L+1)$ elements.

• Hi S.Dan and welcome to scicomp! I'm curious... is this a homework problem? Your question is well within the scope of this SE site and we do accept homework-style questions, but it's important to disclose upfront if a question is a homework problem or not. – Paul Nov 12 '14 at 3:09
• Yes it is and I started following computer Science engineering two weeks ago. So these kind of topics are pretty much new to me. – S.Dan Nov 12 '14 at 9:50

Each cell in mantissa can take $\beta$ values except for the first cell which takes only ( $\beta$ -1) values (since it cannot hold '0' in it)
$\therefore$ the number of elements in the set $\mathbb F$ = (U-L+1)2($\beta-1)\beta_{(1)} \beta_{(2)}\beta_{(3)}....\beta_{(t-1)}$
$$=2(\beta-1) \beta^{t-1}(U-L+1)$$