Calculate the number of mantissa digits

Assignment Help JAVA Programming
Reference no: EM132103871

Answer the following Question :

Problem 1 : Consider a computer that uses five-decimal-digit numbers. Let fl(x) denote the floating-point machine number closest to x. Let x = 0.5321487513, y = 0.5321304421, and z = 0.532148713 × 10-5 .

(a): What are the values fl(x), fl(y), and fl(z)?

(b): What is the relative error between x - y and fl(x) - fl(y)?

(c): What is the relative error between x - z and fl(x) - fl(z)?

(d): What is the reason for such different errors in (b) and (c)?

Problem 2 : If f(x) = (2x+1)/( 1-x2) - (1/1+x) is computed in fl-arithmetic by the formula (2.0 * x + 1.0)/(1.0 - x * x) - 1.0/(1.0 + x) then there will be a loss of precision for x close to zero. Explain why. Propose an algorithm for computing f(x) that will produce small relative error for x close to zero.

Problem 3 : Among the following three algorithms, which is the best and which is the worst for evaluating f(x) = tan(x) - sin(x) for x ~ 0? Briefly explain. (a) (1/ cos(x) - 1) sin(x), (b) (x3)/2, (c) *tan(x) sin2 (x))/(cos(x) + 1).

Problem 4 : Propose an algorithm for computing the following expression that avoids the loss of precision: f(x) = sqrt( 1/(1 - x)) - sqrt( 1/cos(x)) for x ~ 0. COMPUTER PROJECT Solutions to the following problems should consist of program codes, computed results, and short write-ups. In the write-up, discuss the results you have obtained and explain them from the numerical point of view. Use SINGLE PRECISION ONLY. Insert COMMENTS in your programs.

PROBLEM 5 : Using a technique explained in the class, calculate the number of mantissa digits and the unit round-off on the machine that you will use for this course. You need to know the number for analyzing errors in this and other home-works and, therefore, I will not be checking your computer projects until you show me a correct solution to this problem.

Reference no: EM132103871

Questions Cloud

What circumstances would cause you to do those things : Why would you worry about doing any privilege escalation or leaving backdoors? What circumstances would cause you to do either of those things?
Compare the execution times of the two versions of program : Write a C program to compute binom(n,m) recursively. The values for n and m should be passed as command-line arguments with appropriate error checking.
What are the characteristics of an ideal memory : What are the characteristics of an ideal memory? Explain the concept of locality of reference both with respect to instructions and data.
Access to elements that have been inserted into the queue : Access to elements that have been inserted into the queue is limited to inspection and removal of the elements with smallest and largest priority only.
Calculate the number of mantissa digits : Using a technique explained in the class, calculate the number of mantissa digits and the unit round-off on the machine that you will use for this course.
What are some examples of marketing activities : What are some examples of "marketing" activities that are associated with the Summer Olympics? How does global marketing
Discuss about privacy preserving data mining methods : "Privacy preserving data mining" is designed to ensure privacy of individuals while performing data mining.
Explain what security vulnerabilities you would look for : Assume you are asked to assess the security of an electronic medical record(EMR) system.
Scheduling algorithms for different types of queuing : First-In-First-Out (FIFO): The jobs arc processed in the arriving order. The job at the front of the queue is served until it has completed.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

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