CS201- DSA Project || Project Title : BIGINT & Calculation of PI || Instructor : Dr. Anil Shukla ||
-
How to run file?
- Just download the file on your device and open main.c
- It is a C-programme so it can be run using gcc compiler on any device.
-
What to input?
- You will get a proper user prompt on running the main.c file.
-
What to expect as a result?
- According to the operation you will prompt the code will fetch you corresponding results.
This repository contains the code for the implementation of a self-designed data structure called BIGINT. It also includes utility functions for complex numbers and fractions. The primary objective of the project is to find the value of 𝜋 (pi) up to 10000 decimal places using the Chudnovsky algorithm.
The project utilizes the Newton-Raphson method for root convergence and the Chudnovsky algorithm to compute the value of pi. Detailed explanations of these algorithms can be found in the documentation.
The repository provides various functions and operations including:
- Basic Operations on Big Integers: Addition, Subtraction, Multiplication, Division, Decimal Division, Remainder (Modulo), GCD, Power, and Factorial.
- Operations on Complex Numbers: Addition, Subtraction, Multiplication, Division, and Conjugate.
- Operations on Fractions: Addition, Subtraction, Multiplication, Division, and Reduction to Simplest Form.
- Computation of pi: Using the Chudnovsky algorithm.
- Miscellaneous: Set Decimal Precision and Exit the program.
The repository includes an output image demonstrating the program's functionality and accuracy in calculating pi.
The tables in the documentation showcase the benchmarks for calculating the value of pi and the square root of 10005 with varying levels of precision.
The project successfully implements the BIGINT data structure and performs arithmetic operations on large integers. It also computes the value of pi using the Chudnovsky algorithm up to 10000 decimal places.
We would like to express our gratitude to our Course Instructor (Dr. Anil Shukla) and Mentor (Avadhesh Gaur) for their guidance and support throughout this project. We also extend our thanks to our parents and friends for their valuable feedback and encouragement.
The project references various online sources, including Wikipedia, CP-Algorithms, Algorithmica, and PlanetMath.
This project is licensed under the MIT License.