Write an algorithm and program to compute p

Assignment Help Computer Engineering
Reference no: EM132192808

Write an algorithm and program to compute p, using the formula described in the text pi=(4/1)-(4/3)+(4/5)-(4/7)+(4/9)...

Output will include your computed value for p, the math library constant expected value for p and the number of iterations it took to reach six-significant digit accuracy.

The number of iterations could exceed 250,000. Make your output clean and easy to read for comparing results. You may NOT use the math library constant in your computation - directly or indirectly. Use the delta of your running computation to determine when to stop.

Efficiency should always be considered. No rounding is required or allowed. Choose the most appropriate loop/decision structures and variable types.

Input: No user input.

Requirements: Use only material covered in the first six chapters. Style requirements as discussed in class expected.

Submission: Include program documentation that provides clear instructions for how to compile and execute your program. im completely lost on almost everything i dont know how to calculate pi without using th emath sonstant or how to get to six significant figures using loops without rounding. i also dont know what is meant by "include documentation for how to compile and execute program". In Java please.

Reference no: EM132192808

Questions Cloud

Write an application that allows a user shows watch demand : Write an application that allows a user to select one of at least five television shows to watch on demand.
Create chronological resume : Create a Chronological Resume going back 5 years of places you have worked, organizations you have participated in, and education.
What are the intended purposes of medical malpractice : What are the intended purposes of medical malpractice? Does the threat of a lawsuit accomplish these purposes?
What is the coase theorem : What is the Coase Theorem? What is a price ceiling? What is a price floor?
Write an algorithm and program to compute p : Efficiency should always be considered. No rounding is required or allowed. Choose the most appropriate loop/decision structures and variable types.
Will a risk averse investor always choose : Will a risk averse investor always choose a Treasury bond over a corporate bond (assume the maturities are the same)? Explain your answer.
Write an algorithm with programming code to move element : Write an algorithm with programming code to move last element to front in a given Singly Linked List.
Write an application that prints the content of al : Write an application that performs the following Creates an ArrayList, called al that can store integers.
Context-related information : Members have to communicate taskrelatedinformation, social-related information, and context-related information." Discuss thiscomment.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the process of automated speech recognition

Describe the process of automated speech recognition. What types of interpretation errors are inherent to this process?

  Define the chromatic number of a graph

Recall the definition of a complete graph K_n is a graph with n vertices such that every vertex is connected to every oilier vertex.

  Write a script that generates a random integer

Using MATLAB, write a script that generates a random integer between 5 and 30000, and then creates the reverse version of that number.

  Reads in a series of lines of input character by character

Write a program that reads in a series of lines of input character by character (using getchar()).

  Create a class having four private double data members

Create a class having four private double data members - side1, side2, side3 and side4 storing the measures of sides of the quadrilateral.

  What the inductive hypothesis provides in the proof

Your proof must explicitly and clearly indicate the base case you prove, the inductive case you prove and what the inductive hypothesis provides in the proof.

  Discuss the efficiency and performance gains

Discuss the Ease of implementation, Efficiency and performance gains, Volume of data concerns, Security issues and Synchronization of distributed data.

  What is a remote procedure call

What is a 'Remote Procedure Call (RPC)'? How a RPC is originated and what are the applications/examples of a RPC process?

  The budget would be flexible with an upper limit but she

preparing a spreadsheet that helps one to plan custom vacation packages for families. the final outcome would be a nice

  Write a matlab function s - convert

Write a MATLAB function S - Convert(a,b,c,d,x) that takes our piecewise cubic interpolant representation and converts it into pp form.

  Write the micro program for the lda instruction

It is required that the LDA instruction cycle of ASC use a maximum of two major cycles. Derive the microinstruction sequence and list any changes needed.

  What would be the effect on the program

Suppose the type of the cansPerPack variable in Volume1.java was changed from int to double. What would be the effect on the program?

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