# 29 - Rounding Errors

1. Computers store floating point numbers in memory. They used a fixed number of bits for each number. For example a 32 bit computer uses ____________________________

3 and 2 bytes individually for each mantissa and exponent in a floating point number

4 bytes of memory to store each floating point number

None of the above

32 bytes - 1 to store each floating point number

2. In a given and fixed (e.g 32 bits) amount of memory there is no limit as to the range of numbers that can be represented.

TRUE

FALSE

3. A 32 bit representation is called _________________ and using the computer industry stanard format for floating point (IEEE standard) the largest number is shown below with a precision of 7 decimal digits. double precision (64 bits)

None of the above

IEE precision (256 bits)

single precision (32 bits)

4. For scientific or heavy duty engineering applications, more space and therefore ____________ may be necessary.

single precision (32 bits)

IEE precision (256 bits)

double precision (64 bits)

None of the above

5. The use of 64 bits to store a single floating point number would _____________________

greatly increase the speed, as well as increase the range

greatly increase the precision, range and speed

greatly increase the range but run a lot slower

greatly increase the speed, but reduce the range

6. If a range goes beyond the _________________________________, this is called an 'overflow'.

number of bits (e.g. 32 bits would allow a mantissa of max 32)

None of the above

most positive or most negative largest number

scope of infinity

7. If the number is __________________, this is called an underflow.

tiny

complex

large

string-like

8. Which of the following could cause an underflow?

multiplying a large number by a small number

dividing a number by a very large number

trying to add and multiply all in one equation

None of the above

9. Some fractions, when converted to decimal, have infinite difits (e.g. 1/3 is 0.3333 recurring). Which of the following statements is true.

There is no solution to this with computers - so the program will crash

Truncation - simply discard all the values after a certain point

The solution is to convert to Hexadecimal.

A run time error will occur if such a number is used in a program

10. _______________ lets a number fit into the available storage space, but can cause issues with calculations that rely on precision which is not there any more.

Decimalising

Floating

Converting to two's complement

Truncation

11. If you had a number such as 2.34234 and you decided to store it as 2.34 - this would introduce an error called a _______________

overflow error

floating error

underflow error

rounding error

12. Rounding errors can have a significant impact and lead to inaccuracies if they accumulate to be large enough to be significant.

TRUE

FALSE

13. The CPU will always flag any error when truncating or rounding so the programmer does not need to deal with this in his/her code at all.

TRUE

FALSE

14. Rounding multiple times can cause errors (rounding errors) to disappear, as with quantity, the error gets hidden.

FALSE

TRUE

15. _________________ are a means of reducing the error when subtracting two nearby numbers.
`_______ were considered hugely important by IBM and in 1968 it added __________________ to the double precision format in the System/360 architecture and retrofitted all machines in the field.`

sequence digits

CPU digits

binary digits

guard digits