Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pi-Calculation How to calculate a pi 1. Choose x and y values at random between 0 and 1.- 2.Make sure (x y) points are centered

image text in transcribed
Pi-Calculation How to calculate a pi 1. Choose x and y values at random between 0 and 1.- 2.Make sure (x y) points are centered around their origin and have a radius of one 3.after several iterations of the process 1 through 2, if the number of points in a circle is k, and the total number of points selected is n,. the value of k has the value of pi /4. 4.Multiply the value obtained from 3 by 4 and you get the pi.. - Print intermediate calculation results with a repeat count of 1000000 times for the previously introduced Pi-computing method, and output the time spent on the calculation after the calculation.. C?WINDOWS?system 32?cmd.exe iterat ions Pl is 4.000000. Error is 0.858407 iterat ions Pl is 3.200000. Error is 0.058407 iterat ions Pl is 3.000000. Error is 0.141593 iterat ions Pl is 3.056000. Error is 0.085593 10 100 1000 10000 iterat ions PI is 3.122400. Error is 0.019193 100000 iterations PI is 3.142880. Error is 0.001287 1000000 iterations PI is 3.142048. Error is 0.000455 .183000 sec

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 Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago