Preview

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

  32 bytes - 1 to store each floating point number

  None of the above

 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.

  FALSE

  TRUE

 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.
singleprecision_maxnumber.png

  single precision (32 bits)

  double precision (64 bits)

  IEE precision (256 bits)

  None of the above

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

  single precision (32 bits)

  double precision (64 bits)

  None of the above

  IEE precision (256 bits)

 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 speed, but reduce the range

  greatly increase the range but run a lot slower

  greatly increase the precision, range and speed

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

  most positive or most negative largest number

  None of the above

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

  scope of infinity

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

  string-like

  tiny

  large

  complex

 8. Which of the following could cause an underflow?

  multiplying a large number by a small number

  trying to add and multiply all in one equation

  dividing a number by a very large number

  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.

  The solution is to convert to Hexadecimal.

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

  Truncation - simply discard all the values after a certain point

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

 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.

  Floating

  Truncation

  Decimalising

  Converting to two's complement

 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 _______________

  underflow error

  overflow error

  rounding error

  floating 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.

  TRUE

  FALSE

 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

  guard digits

  CPU digits

  binary digits