Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started