Question: Approximating Square Roots Approximating a Square Root Using a Loop Out: 10/4 CSc 1350: Programming Project # 2 Due: 10/15 by 11:50 PM . Using

 Approximating Square Roots Approximating a Square Root Using a Loop Out:10/4 CSc 1350: Programming Project # 2 Due: 10/15 by 11:50 PM. Using Iteration, . More on Basic Arithmetic Operations . More onDecision Statements, and . More on Writing Interactive Programs Definition 1. A

Approximating Square Roots Approximating a Square Root Using a Loop Out: 10/4 CSc 1350: Programming Project # 2 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 square root of a number n is a number s such that S -m In this project, you will use a loop to approximate the square root of a 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 sanduwich) theorem. The theorem simply means that given any closed continuous interval [a.a. there is a number p such that a K p 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.7525.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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!