https://github.com/anshikarawat14/biginteger
This repository provides a robust implementation of a BigInteger library in C. This library allows for the manipulation of arbitrarily large integers beyond the typical limits of standard data types in C.
https://github.com/anshikarawat14/biginteger
c header-files
Last synced: about 1 year ago
JSON representation
This repository provides a robust implementation of a BigInteger library in C. This library allows for the manipulation of arbitrarily large integers beyond the typical limits of standard data types in C.
- Host: GitHub
- URL: https://github.com/anshikarawat14/biginteger
- Owner: Anshikarawat14
- Created: 2024-07-12T08:35:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-21T11:26:58.000Z (over 1 year ago)
- Last Synced: 2025-01-21T12:26:28.262Z (over 1 year ago)
- Topics: c, header-files
- Language: C
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BigInteger
This project implements arithmetic operations for extremely large integers that exceed standard data type limits. It supports addition, subtraction, multiplication, division, and remainder calculations using a custom data structure. The project demonstrates efficient handling of large numbers through dynamic memory allocation and linked list representations, ensuring accuracy and scalability for computational tasks.
Key Features of Projectπ
- Addition of Big Integers β:
Handles addition of integers exceeding standard data types, efficiently processing large numbers by storing each digit in a linked list node.
- Subtraction of Large Numbers β:
Supports subtraction for numbers of varying lengths, managing borrowing automatically during the operation.
- Multiplication of Big Numbers βοΈ:
Implements multiplication for arbitrary-sized integers using a digit-by-digit approach, with carry management.
- Division & Remainder Calculation βπ:
Performs division with high precision, returning both the quotient and remainder. Handles large divisors and supports modular arithmetic operations.
- Dynamic Memory Allocation π§ :
Uses malloc() for efficient handling of memory as the size of numbers grows, adjusting dynamically with linked list nodes.
- Linked List Representation π:
Represents big integers using a custom linked list, where each node stores a digit in reverse order for easy arithmetic operations.
- Modular Approach π§©:
Divides the project into distinct modules for each arithmetic operation, ensuring clean, readable, and reusable code.
- Error Handling & Input Validation β οΈ:
Handles invalid input cases, displaying appropriate error messages for non-numeric or malformed numbers and unsupported operations.
- Scalability π:
Can handle integers of arbitrary size, scalable for a wide range of applications, depending on system memory.
- User Interface π₯οΈ:
Simple text-based menu for interacting with the program, providing options for arithmetic operations.
- Cross-Platform Compatibility π:
Works on any platform that supports C and linked lists, without reliance on specific libraries or frameworks.