Topic 5 - Rounding Errors Flashcards
What is a rounding error?
When rounding creates an error between the original number and the rounded number
Define absolute error
Absolute error is the difference between the theoretical exact value calculated with no errors present and the processed computed value to be stored
Define relative error
Relative error is the value of the absolute error divided by the theoretical exact value with no errors present
What is the formula to find absolute error
MOD (exact value - computed value)
What is the formula to find the relative error
exact value
Find absolute and relative errors for a computed value of 0.02 and an exact value of 0.017.
Absolute error = MOD (exact value - computed value)
Absolute error = MOD (0.017-0.02) = 0.003
Relative error = Absolute error over exact value
Relative error = 0.003/0.017 = 0.17647
Define precision
Precision is associated with word length and the maximum number of significant digits that can be represent
Define range
range is the set of all numbers that can be represented using a specific number system
Define floating point
Floating point is a real data type where the binary point can move within the number
Define fixed point
Fixed point is a real data type where a number has a fixed number of digits either before or after the decimal point
Define normalised floating point
Normalised floating point number is where the binary point position is fixed in standard form position and the exponent can float to reflect different values of that number
Define mantissa
Mantissa is the part of the floating point number that includes the significant digits within a number
Define exponent
Exponent is the power that the number within the mantissa is raised
Define underflow
If the result of a calculation is smaller than the smallest number that can be represented by the system, then an underflow will occur and the result will be stored as zero; dividing very small numbers can cause underflow.
Define overflow
If the result of a calculation is too large a value to be represented by the system, then an overflow will occur; this can cause serious problems and is most likely to occur when multiplying two large numbers. Double precision registers can be used to minimise the occurrence of overflow.