Code Monkey home page Code Monkey logo

bigint_in_c's Introduction


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

Anant Prakash Singh - 2021CSB1066
Pankaj Singh - 2021CEB1026 Aditya Kumar Sahu - 2021MCB1228


  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.

bigint_in_c's People

Contributors

theviking733n avatar kartik150704 avatar adiitya25 avatar itspunkaj avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.