Explanation of Solution
Representational error:
Representational error is an error which occurs when performing arithmetic operations such that the precision digit produced by the arithmetic calculation is greater than the precision of the machine.
- The addition of (A+B) with C produces the same result as adding A with (B+C) according to the associative law.
- But due to the limitation of precision, the result produced by ((A+B)+C) is not same as (A+(B+C))
Example: consider the following equation:
((A+B)+C) (1)
Substitute the value of A = –5688 × 103, B=5689×103, and C=5648×100 in the Equation (1)
Initially, compute the sum of the first two values (A+B):
– 5688 × 103 5689 × 103 _ 1 × 103 (2)
Here, the value 1×103 can be written as 1000×100.
Then, compute the addition of the above result of Equation (2) with the value of C, ((A+B)+C)
1000 × 1005648 × 100_6648 × 100 (3)
Consider the following equation:
(A+(B+C)) (4)
Substitute the value of A = –,
Compute the sum of the two values
Here, the value
Here, the value
Then, compute the addition of the above result of the Equation (5) with the value of A,
Here, the value
Thus, when considering the thousands' place alone the result produced by both Equations (3) and (6) are the same, but the result differs when considering together the thousands, hundreds, tens and one’s place.
Therefore, this type of error is called representational error. It is also called as round-off error.
Cancellation error:
Cancellation error is an error that occurs when performing arithmetic operations between numbers that differ in magnitude.
Example: consider the following equation:
Substitute the value of
Here, the value
Initially, compute the sum of the first two values
Here, the value
Then, compute the subtraction of the above result of Equation (2) with the value of C,
In general, the result produced by
Therefore, this type of error is called cancellation error.
Underflow error:
Underflow error is an error which occurs when the precision digit produced by the arithmetic calculation is too small to represent in the machine.
Example: consider the following equation,
Substitute the value of
Compute the sum of the first two values
Here, the value
The result of (A+B) is
Therefore, this type of error is called underflow error.
Overflow error:
Overflow error is an error which occurs when the precision digit produced by the arithmetic calculation is too large to represent in the machine.
Example: consider the following equation:
Substitute the value of
Compute the sum of the first two values
Here, the value
The result of
Therefore, this type of error is called overflow error.
Explanation of Solution
Interrelated terms:
The above terms, “Representational error”, “Underflow error”, “Overflow error”, “Cancellation error” is interrelated to each other.
- Because, all the terms represent the error which occurs due to the limitation of representing a number in a computer.
Want to see more full solutions like this?
Chapter 18 Solutions
COMPUTER SCIENCE ILLUMIN.-TEXT
- What is the worst case time complexity of the following algorithm for i = 1 to x do for j = 2^((i-1)x) to 2^(in) do print(i,j)arrow_forwardProve for each pair of expression f(n) and g(n) whether f(n) is big O, little o Ω,ω or Θ of g(n). For each case it is possible that more than one of these conditions is satisfied:1. f(n) =log(n2^n), g(n) = log(sqrt(n)2^(n^2))2. f(n) =nsqrt(n) +log(n^n), g(n) =n + sqrt(n)lognarrow_forwardI need to make a parallel version of this sequential codearrow_forward
- I need to make a parallel version of this sequential code.arrow_forwardBenefits of using arrays as instance variables: What are the advantages of incorporating arrays as instance variables within a class? Initializing and managing arrays: How do you initialize and manage arrays within class constructors and mutators (setters)? Example of using arrays as instance variables: Share an example where you have used arrays as instance variables and discuss its application in a real-world scenario. Common mistakes with arrays as instance variables: What are some common mistakes to avoid when working with arrays as instance variables? Information hiding violations: What is the potential violation of information hiding when using arrays as instance variables? How can this be resolved?arrow_forwardDo you think that computers should replace teachers? Give three references with your answer.arrow_forward
- Is online learning or face to face learning better to teach students around the around the world? Give reasons for your answer and provide two references with your response. What are benefits of both online learning and face to face learning ? Give two references with your answer. How does online learning and face to face learning affects students around the world? Give two references with your answer.arrow_forwardExplain Five reasons if computers should replace teachers. Provide three references with your answer. List three advantages and three disadvantages face to face learning and online learning may have on children. Provide two references with your answer.arrow_forwardYou were requested to design IP addresses for the following network using the address block 10.10.10.0/24. Specify an address and net mask for each network and router interfacearrow_forward
- For the following network, propose routing tables in each of the routers R1 to R5arrow_forwardFor the following network, propose routing tables in each of the routers R1 to R5arrow_forwardUsing R language. Here is the information link. http://www.cnachtsheim-text.csom.umn.edu/Kutner/Chapter%20%206%20Data%20Sets/CH06PR18.txtarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





