Arithmetic Errors Flashcards
What is an overflow error?
Results of a calculation that are too large in magnitude to represent in a given scheme.
What is representational error or round-off error?
An arithmetic error cause when precision of a result from an arithmetic operation is greater than the precision of the scheme used to store it.
What are two methods of dealing with round-off errors?
- Round-by-Truncation
- Round-to-nearest
What is round-by-truncation?
All digits after the (n-1)^th position are discarded.
What is round-to-nearest?
Rounds to nearest value allowed by the precision based on the nth position digit.
What are the two common methods of round-to-nearest?
- “ties away from zero”
- “ties towards even”
What is the “ties away from zero” method?
This says that we round to the nearest value, and ties will be round to the nearest value with larger magnitude.
What is the “ties towards even” method?
Rounds so that the least significant digit is even.
What is an underflow error?
Results of a calculation that are too small in magnitude to represent in a given scheme.
What is the underflow gap?
The unrepresentable range from 0 to the smallest value.
What is cancellation error?
A loss of significance during calculations, due to the limits of precision.
How to cancellation errors occur?
- Addition of number with large difference in magnitude
- Subtraction between very similar values