Illustrate the effects of rounding errors and truncation

Assignment Help Computer Engineering
Reference no: EM132217576

Design and construct a computer program in Java that will illustrate the effects of rounding errors and truncation errors.

The following is a plot of the function f(x) = sin(x3) + x2 :

In order to illustrate the effects of the two major error sources, rounding and truncation, attempt to determine an approximation to the derivative of f(x) at x = 2.0 radians using the difference approximation given below. (The true answer is 4 + 12 cos (8) or about 2.2539995942966376896).

Use the formula: f''(x) ? (f(x+h) - f(x)) / h with h=1, 0.5, 0.25, ... 1.8189894035459e-12 (i.e., keep halving h until it is less than 2.0e-12.) Print out the values of h, your approximation to f''(x), and the error in the approximation for each value of h used. This error will include the effects of both truncation and rounding.

Write down (in your output file or in another file submitted with your program) any conclusions that you can make from these experiments.

Reference no: EM132217576

Questions Cloud

Write a program to compute the mileage given by a vehicle : Write a program to compute the Mileage given by a vehicle. Mileage = (new_odometer - old_odometer)/(gallons_gas) // illustrating how ‘for' loop works.
Write a statement to call template function defined : Assume dList[50] declares an array of 50 doubles, and is properly initialized. Write a statement to call template function defined above to sort the array.
Find the distance and midpoint of the line : Create a line struct from point struct having x and y coordinates. Find the distance and midpoint of the line (as members of struct).
Explore - analyse and visualize the given dataset : Content Analyst in an ABC online multimedia company and your task for this analytical project is to use analytical tool (i.e. IBM Watson Analytics) to explore
Illustrate the effects of rounding errors and truncation : Design and construct a computer program in Java that will illustrate the effects of rounding errors and truncation errors.
Explain how you could use a static member variable : Assume that you have a Person type variable that references a Student type object. I.e. Person p = new Student("Sally", 18);
Create a class for gummy with data fields for type : Create a class for Gummy with data fields for type and calories per serving. Include a constructor that takes parameters for each field.
Implement the functionality of a simple web-based email : Write a Python script, that implements the functionality of a simple, web-based email client .
What is the delay in this case : Consider a multicomputer in which the network interface is in user mode, so only three copies are needed from source RAM to destination RAM.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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