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.

  • 1
    $\begingroup$ 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. $\endgroup$
    – Paul
    Nov 12 '14 at 3:09
  • $\begingroup$ Yes it is and I started following computer Science engineering two weeks ago. So these kind of topics are pretty much new to me. $\endgroup$
    – S.Dan
    Nov 12 '14 at 9:50

I found the solution to my own problem.

The number of values the exponent can take = (U-L+1)

The sign can take 2 values.

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)$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.