A simple C++ project to test the randomness of a generator and estimate the value of π using Euclid's Algorithm for GCD.
This project generates an array of random integers and calculates the probability that the GCD (Greatest Common Divisor) of randomly chosen pairs is 1. The estimation of π is then derived from this probability using the formula: π ≈ √(6 * (N/2) / Count), where N is the array size.
-
Clone the repository:
git clone https://github.com/snigdhab7/Testing_Random_Generator.git
-
Import the project into your preferred C++ IDE.
-
Build and run the file. Link to Random Generator Test Code File
-
The console will display the estimated value of π based on the random generator.
- Enhance the randomization algorithm.
- Implement additional statistical tests.
- Share your findings and improvements with the community.
Contributions are welcome! Feel free to open issues and pull requests.