Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java language Approximating a Square Root Using a Loop Out: 10/4 Due: 10/15 by 11:50 PM Using Iteration, More on Basic Arithmetic Operations, More on

Java language

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Approximating a Square Root Using a Loop Out: 10/4 Due: 10/15 by 11:50 PM Using Iteration, More on Basic Arithmetic Operations, More on Decision Statements, and More on Writing Interactive Programs Definition 1. A quare root of a number n is a number s such that In this project, you will use a loop to approximate the square root ofa number. There is an elementary algorithm used to find the square root of a number that takes advantage of a mathematical principle commonly referred to as the pinching (a.k.a. squeezing or sanduwrich) theorem. The theorem simply means that given any closed continuous interval [a, bl, there is a number p such that a 100, so we can obtain a better approximation by squeezing our interval to its lower half, 1,50.5]. Next, we consider the midpoint of this interval. 25.75x25.75 > 100, so we choose the lower half of the interval, [1, 25.75). 13.375 13.375 > 100, so we narrow the interval to [1, 13.375], the lower half of the interval. 7.18757.1875 100, so we narrow the interval to its lower half, (7.1875, 10.28125], etc. we will eventually obtain a midpoint whose square gives us 100. Due to truncation and roundoff errors by computers, Duncan Fall 2017

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago