Computers and Technology
Computers and Technology, 15.02.2021 20:40, Shelbs01

Suppose in the year 2102 that evaluating x<0.72 for an input parameter x becomes an important operation to do quickly. As such, CPU manufacturers want to evaluate this operation approximately in hardware as a single x86 operation, f_p72. As a computer engineer, you are tasked with creating the necessary components to execute the f_p72 instruction. Suppose that the function f_hat(x) carries out the f_p72 instruction for a given floating point input x. That is, f_hat(x) evaluates the approximation of x0.72. Write a short program to evaluate the magnitude of the relative error in evaluating 20.72 using f_hat for the input x. f_hat(x) is a function that evaluates an approximation to x0.72 for a given floating point input x. x is a floating point number. Store the magnitude of the relative error in using the approximation f_hat in relative_error.
The setup code gives the following variables:
Name Type Description
f_hat function a function which has the same effect as the fp72 instruction
x a floating point number floating point number
Your code snippet should define the following variables:
Name Type Description
relative_error floating point numbe r the relative error in evaluating x0.72 using f_hat

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:20, ashcormu11
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b. c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, jarrettashlyn
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr. nextdouble(); minutestraveled = scnr. nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system. out. println("miles: " + milestraveled); } }
Answers: 2
image
Computers and Technology, 23.06.2019 00:10, witerose701
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
image
Computers and Technology, 23.06.2019 15:20, manarhizam12
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
Do you know the correct answer?
Suppose in the year 2102 that evaluating x<0.72 for an input parameter x becomes an important ope...

Questions in other subjects:

Konu
Mathematics, 16.08.2020 01:01