Skip to content

Ashutosh-iitrpr/Big-Int-in-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


CS201- DSA Project || Project Title : BIGINT & Calculation of PI || Instructor : Dr. Anil Shukla ||


  1. 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.
  2. What to input?

    • You will get a proper user prompt on running the main.c file.
  3. What to expect as a result?

    • According to the operation you will prompt the code will fetch you corresponding results.

BIG INT

License

Introduction

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.

Equations

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.

Functions & Operations

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.

Output

The repository includes an output image demonstrating the program's functionality and accuracy in calculating pi.

Output Image

Tables

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.

Conclusions

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.

Acknowledgements

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.

References

The project references various online sources, including Wikipedia, CP-Algorithms, Algorithmica, and PlanetMath.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages