Calculate the square root using the babylonian method

Assignment Help Computer Engineering
Reference no: EM132217425

Written in java,

Suppose you want to find the square root of x, guess that the square root is x/2. Test your guess (what's the difference between x and guess*guess). If your guess isn't accurate enough, try again. Your new guess should be 0.5 * (last guess + X / last guess). Keep going until your guess is close enough.

Your class should include a recursive method for calculating the square root using the Babylonian Method.

Sers of your class should be able to specify the number they'd like to take a square root of as well as how much error they will tolerate in the square root estimation. For testing purposes, you should print the output.

Reference no: EM132217425

Questions Cloud

Advantages associated with holding certified check : Advantages associated with holding a certified check include all of the following, except:
Writing a literature review using given information : Before you can begin to write a literature review, you must spend a substantial amount of time reviewing the literature to locate the articles.
Critically analyse the marketing of a selected brand : Critically analyse the marketing of a selected brand or category (defined as '... a class or division of people or things regarded as having particular shared
The conditional liability of indorsers may be disclaimed : The conditional liability of indorsers may be disclaimed if they indorse a negotiable instrument with the words __________.
Calculate the square root using the babylonian method : Suppose you want to find the square root of x, guess that the square root is x/2. Test your guess (what's the difference between x and guess*guess).
Calculate the crc-15 value for a given plain text file : Write a program that calculates the CRC-15 value for a given plain text file and which can also verify the correctness of a given file that already has.
Create a plot from a set of arrays which will be a series : Create a plot from a set of arrays which will be a series of line segments each with its own line thickness.
Does customer satisfaction measure service quality : Does customer satisfaction measure service quality? Why or why not?
What is the address of the instruction that caused the abend : What is the address of the next instruction which will be executed? What is the value of the condition code at the time of the ABEND?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Maintain record of the professional development of employees

The system to be developed will allow a large company to coordinate and maintain records of the professional development of its employees.

  Derive a table that shows all possible combinations of mulch

Suppose a lawn care company can install either mulch or pine straw for flowerbeds of their residential customers.

  Draw a uml class diagram to support your claim

Identify one or two key distinctions within that class that would prompt you to create subclasses instead of fields

  Describe which of the four factors was used in justification

Find a URL for a patent case where the patent was found to be invalid. Describe which of the four factors was used in the justification.

  Design and create a presentation for any course

Design and create a presentation for any course. 3 Different Types of Slide Layouts; Dynamic Spell- Checked Content; A Chart, Diagram or Shape and An Animation.

  To practice the use of a vector and the vector functions

To practice the use of a vector and the vector functions: Specifications: This program will allow the user to see a list of teams, add a team to the list.

  How the floating point value would be stored using ieee

Show how the floating point value (1/16) would be stored using IEEE-754 single precision (be sure to indicate the sign bit, the exponent, and the significand fields).

  Create two parallel arrays that represent a standard deck

Create two parallel arrays that represent a standard deck of 52 playing cards. One array is numeric and holds the values 1 through 13.

  Explain the action of the function

Describer the action of the function. What is the function in the library that performs a similar calculation.

  What is the running time of adding n elements

What is the running time of adding n elements to an initially empty collection C in this case?

  What is the meaning of twos-complement

What is the meaning of zero bit = 0 when two's-complement binary coded numbers are added?

  Outline a security breach or cyberattack

Find an article on the Internet, outline a security breach or cyberattack. Provide a link to the article and suggest a control that would mitigate against.

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