4.5.4.9 Underflow and overflow Flashcards

1
Q

What is overflow?

A

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

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

When might overflow occur?

A

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
3
Q

What is underflow?

A

When a number or the result of an equation is too small to represent in the available bits.

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

When might underflow occur?

A

adding two negative numbers
Usually occurs when a very small number is subtracted from a very large number, or a large number is divided by a much larger number.

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

What is a cancellation error?

A

Loss of significance is an undesirable effect in calculations. It occurs when an operation on two numbers increases relative error substantially more than it increases absolute error, for example in subtracting two nearly equal numbers (known as catastrophic cancellation). The effect is that the number of significant digits in the result is reduced unacceptably.

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

When might cancellation occur?

A

Adding together two numbers of very different

sizes e.g. a tiny number to a very big number

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