Skip to content

revanth3003/Pi_Approximation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Pi_Approximation

Screenshot 2022-12-06 at 8 38 01 PM

The file Error.cpp takes the number of intervals (N), as an input into the function and returns both the computed value of π as well as the corresponding error.

Example : Input : Enter the number of intervals (N) : 55

     Output : Approximated Pi: 3.13181
              
              Error: 0.00978416

The file Interval.cpp takes maximum acceptable error as an input and returns the error and the necessary number of intervals such that the error tolerance is respected.

Example : Input : Enter your maximum acceptable error: 1e-8

      Output : Error: 9.99998e-09
               
               Number of interval: 543283

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages