Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, this is my first experience with any sort of programming so it would be v

ID: 3884213 • Letter: H

Question

Hello, this is my first experience with any sort of programming so it would be very much appreciated if you could help me with this.

Topic: Number Storage in Computers Problem 1 (a) Evaluate the following polynomial at x 3.17 y=x3-5x2 +4x-0.15 (b) Repeat (a) using 3-digit arithmetic with rounding after each mathematical operation. Consider raising to a power to be one operation. Evaluate the true percent relative error Refer to the text for the definition of true percent relative error (c) An alternate expression of the polynomial is shown below. Evaluate this alternate expression using 3-digit arithmetic with rounding after each mathematical operation. Evaluate the true percent relative error and compare the result with part (b) y=((x-5)x+4)x-0.15 Problem 2 (a) Convert 0.11 into base-2 and store the result in a 10-bit word of the following format: (0- pos, 1-neg) 2 Sign of Sign of Magnitude of exponent Magnitude of mantissa number exponent (b) Convert the stored number back into base-10, and calculate the true percent relative error caused by the storage process Problem 3 What is the smallest positive number that can be accurately stored in a 10-bit word of the same format as the one in Problem 2? Problem 4 The quantity 0.375 can be stored exactly in the 10-bit word from Problem 2. What is the next larger quantity that can be stored exactly in that 10-bit word? In other words, what is the smallest number greater than 0.375 that can be accurately stored in the 10-bit word of Problem 2?

Explanation / Answer

Please provide 1 problem at a time. We are allowed to solve only 1 problem

a.
y = x3 - 5x2 + 4x - 0.15
   = (3.17)3 - 5(3.17)2 + 4(3.17) - 0.15
   = 31.855013 - 5(10.0489) + 12.68 - 0.15
   = 31.855013 - 50.2445 + 12.68 - 0.15
   = -5.859487

b.
y = x3 - 5x2 + 4x - 0.15
   = (3.17)3 - 5(3.17)2 + 4(3.17) - 0.15
   = 10.0 * (3.17) - 5 *(10.0) + 12.7 - 0.15
   = 31.7 - 50 + 12.7 - 0.15
   = -18.3 + 12.7 - 0.15
   = -5.6 - 0.15
   = -5.75

Percentage Relative Error = AbsoluteError/TrueValue x 100
                                             = 0.109487 / -5.859487 * 100
                                             = -1.869

c
y = ((x - 5) x + 4) x - 0.15
   = ((3.17 - 5) 3.17 + 4) 3.17 - 0.15
   = (-1.83 * 3.17 + 4) 3.17 - 0.15
   = (-5.80 + 4)3.17 - 0.15
   = -1.8 * 3.17 - 0.15
   = -5.71 - 0.15
   = -5.86

Percentage Relative Error = AbsoluteError/TrueValue x 100
                                             = 0.000513 / -5.859487 * 100
                                             = -8.76e-2