Week 12 Floating Point Flashcards

(5 cards)

1
Q

State two reasons why values stored using a floating point representation are usually stored in normalised form.

A

Maximises precision for given number of bits;
Unique representation of each number (simpler to test for equality of numbers);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

State difference between absolute and relative error

A

Absolute is the difference between the nearest representable value and the actual value.
Relative is the absolute error / actual value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain why the relative error is usually considered to be a more important measure of error than the absolute error.

A

The effect / impact of an error depends on its size relative to the number that should be represented.
(For example, a particular (absolute) error is more significant the smaller the number that is)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

State one advantage of using a floating point system over a fixed point system and one advantage of using a fixed point system over a floating point system.
You should assume that the two systems use the same number of bits to store a value.

A

Advantage of floating point:
(In a given number of bits) a floating point system can represent numbers with a greater range than a fixed point system;

Advantage of fixed point:
(In a given number of bits) a fixed point system can represent (some) numbers more precisely than a floating point system;

Calculations can be performed more quickly;

Represents all numbers to a constant level of precision/accuracy;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In the context of floating point, explain what overflow is and give an example of a situation which might cause overflow to occur.

A

The result of a calculation is too large to store/represent // a number is too large to store/represent;
In the available number of bits / storage space;

Example:
Multiplying two numbers together;
Dividing a number by a number less than one / small number;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly