/piEstimator

Estimating the value of pi using uniform distribution , also called Monte Carlo algorithm.

Primary LanguageC++

piEstimator

Estimating the value of pi using uniform distribution , using Monte Carlo method.

Introduction

The calculations are made in order to estimate π by creating a square with a side=1 and creating random points on the square using the uniform distribution function and then counting the number of points inside the circle circumscribed inside the square (radius=1).

Math

Usage

Run the program and after that pass the number of points to generate. (This works on C++11 or higher). Input 0 to exit.

Screenshot

Screenshot