Test a program for summing

Assignment Help Programming Languages
Reference no: EM13307160

You are to implement and test a program for summing 1/x as x runs over all approximately eight million (23 fraction bits) single precision floating point numbers in the interval [1, 2). You are to do this on a server, PC (or Mac) of your choice. You are first asked to predetermine estimates of your implementation's computation time (architecture and compiler dependant), result accuracy (algorithm and round-off dependant), and result value (real valued sum estimate). Specifically:

a.       Discuss the computational environment for your tests, including the compiler, operating system, machine MHz and cycle times for appropriate instructions and whether pipelining affects your execution time.

b.      Predetermine an estimate of the time utilizing single precision for the variables for all computations from any documentation you can find from the hardware manufacturer and/or compiler and system provider.

c.   Predetermine a rough estimate of the exact sum (hint: how many terms are being added and how large is an "average term").

d.       Predetermine an estimate of the accuracy. Single precision computation should be done in round to nearest mode as provided by standard C implementations.  By accuracy of the sum we mean the difference between the rounded sum of rounded values compared to the exact sum of exact values.

e. Give the measured running time and the computed result for your implementation. Compare the results with your estimates of running time and approximate sum. Compute the sum in double precision and single precision and compare to give a reasonable value for the accuracy of the single precision sum. Compare your result with another student's results that might have performed the sum in a different order. Can you explain the size of the approximation error?

Reference no: EM13307160

Questions Cloud

Regardless of the value of the input k : Suppose the DES F function mapped every 32-bit input R, regardless of the value of  the input K,
Calculate the net acceleration of the man : The man completely inhales and jumps into the deep end of a pool with a depth of 9 feet. Calculate the net acceleration of the man with his breath completely inhaled while totally submerged in the water
Determine the principle strains at a point on the surface : A rod is subjected to a tensile load of 25k and has a diameter or 2in, determine the principle strains at a point on the surface of the rod
Determine what kind of claim you want to make : Construct either a position or proposal argument (see "Argument" power point) based on one of the online topics listed in "online issues" or one related to online issues.
Test a program for summing : You are to implement and test a program for summing 1/x as x runs over all approximately eight million (23 fraction bits) single precision floating point numbers in the interval [1, 2). You are to do this on a server, PC (or Mac) of your choice..
What is the speed of the sled right before the team jumps : At the start of a race, a four-man bobsled team pushes their sled as fast as they can along a 50 m flat starting stretch. What is the speed of the sled right before the team jumps on the sled
Calculate the flow rate from the lake and into the aquifer : A geological fault truncates the aquifer at a distance "L" upstream from the river. The hydraulic conductivity of the area between the fault and the river is 50 ft / day and hydraulic conductivity between the lake and the fault is 100 ft / day.
Calculate the buoyant force of the water acting on the man : The man completely exhales and jumps into the deep end of a pool with a depth of 9 feet. Calculate the buoyant force of the water acting on the man with his breath completely exhaled
Identities of peers in the range : I shall create a new question for you to post up your answer so you can earn the points you deserve for helping me out.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write application that inputs a telephone number as string

Write an application that inputs a telephone number as a string in the form (555) 555-5555. The application should String method split to extract the area code as a token.

  Write method that will take employee-s first name

Implement a class that will have: Implement the method that will take employee's first name and last name as the input and will return full name.

  Write down the conditions which are not satisfied in program

Sequential program consists of the following five statements, S1 through S5. Considering each statement as separate process. Specify which of the three conditions is not satisfied.

  Create a database for the sales and bonus records

Create a database for the sales and bonus records of different years and reinforce topic material related to files and exceptions.

  Write an algorithm that converts a linear measurement

Write an algorithm that converts a linear measurement in feet and inches into meters. One inch is equivalent to 2.54 centimeters.

  Write code to find largest value found in parking tickets

Without using any additional variables, write some code that results in mostTickets containing the largest value found in parkingTickets.

  Write a prolog program that finds the last item in a list

Write a Prolog program that finds the last item in a list. Include a test query.

  Write down program to arbitarily choose numbers

Write down a program to arbitarily select the numbers of 3 finalist to recieve a prize. Ensure not to choose same number twice. For instance picking finalist 3, 15, 29 woul valid but picking 3,3,31 would be invalid.

  Program to find real solutions

Method, which determines whether value of "b squared" - 4ac is negative. If negative, code then  prints out message "no real solutions" and returns from method.

  Create test application that creates objects of type book

Create a test application that creates several objects of type book class and adds each Book to an ArrayList. Your test application should then do the following.

  Falling letters game

Generic queue in the first project and generic list in the second project - In the second project, the player clicks the mouse on any falling letter to remove that letter from the window.

  Write functions

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd