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

  Write a recursive program to compute the number of ways in

write a recursive program to compute the number of ways in which an integer k can be written as sum each of whose

  Design a solution to the problem by using the five steps to

the software needs to allow the restaurant owner to schedule employees for up to 40 hours in a seven-day week. the

  Programming using the java language

Programming using the Java language. The basic concepts of object-oriented programming. Topics used will include algorithmic logic, control structures, data and program design, objects and classes.

  Write a java program to compute salary

Write a Java program which computes the Salary for a given number of employees. The program prompts user to enter n the number of employees.

  Review the threading

Threading. A considerable amount of time was spent trying to get threading to work properly. Initial designs included a thread called Turn, which would call a subsequent thread for performing communication actions with the LAMP server. Unable to..

  Implementing the anagram searching algorithm

The deliverables are one Java file, implementing the anagram searching algorithm, with a main method reading the file to be processed as command line argument

  Sorting routine adopted in the java api for arrays.sort()?

What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.

  Write cross-reference program which builds a data structure

CSC-220 - Write a cross-reference program which builds a data structure with all words included from a text file and records the line numbers

  Design a class which stores demographic information

Design a class which stores demographic information of a person like name, address, phone number, male/female - how will you handle the validations of fields

  What is difference between linkedlist and arraylist in java

What is the difference between LinkedList and ArrayList in Java

  Online reservation and bookeeping software for beauty salon

Online Reservation and Bookeeping Software for Beauty Salon - develop a software (with Java) for a beauty salon, which will replace a current paper based system, so that people could make reservations online and administrator could do book keeping.

  Class diagram represents the relationship between parents

Draw a class diagram that represents the relationship between parents, children, and grandparents. Take into account that a person can have both a parent and a child. Annotate associations with roles and multiplicities.

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