Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function for the algorithm for approximating pi. Characterize the performance of the algorithm by plotting the value and the error of the approximation

Write a function for the algorithm for approximating pi. Characterize the performance of the algorithm by plotting the value and the error of the approximation by using the difference or fractional variation from MATLABs pi function and the time spent in the calculation against a range of N values which measures the throughput of the calculation. image text in transcribed
1. Archimedes Approximation The idea of Archimedes' method is to notice that a regular N-polygon approac the number of sides, N approaches infinity. Since we can easily calculate the length of the perimeter of the N-polygon, we can approximate t the circumference of the circumscribed circle. IfN 8, then T 3.0614674589207183: Opp B 360/N A = B/2; halfs sind (A) shalfs 2; poly-circ = N*S; pi-approx poly-circ/2; sinA

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions