Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.3k answers

1.7k comments

556 users

0 votes
Hello,

my question is about exercise 3 b) in the exam of WS 17. I tried to convert the last example -41.1 to ReSyFloat, but I don't understand why the correct solution is NaN.

We have B=2, e=3, m=4 so beta should be 3. I used the algorithm on slides 23-25 in the chapter Floating Point Numbers. In the first step I get E=floor(log_2(41.1))=5, but then we have E+beta = 5+3=8>2^3-1, so we can't represent the exponent using 3 bits and therefore my solution would be overflow and not NaN.

Why is the solution NaN?
in # Mandatory Modules Bachelor by (120 points)

1 Answer

0 votes
Yes, we do not carefully distinguish between overflow and NaN (IEEE 754 does that very carefully). You are right that the problem is rather an overflow, what the teaching tool wants to express is that this number cannot be represented.
by (170k points)

Related questions

0 votes
1 answer
0 votes
1 answer
asked Aug 23, 2020 in # Mandatory Modules Bachelor by kremenadla (380 points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Imprint | Privacy Policy
...