Skip to content

rajeevtapadia/BigInt-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

BigInt-C

BigInt.h is a stb style header file for handling arbitrarily large integers in c

How to use?

  • as header file
#include "BigInt.h" // only includes declarations
  • as source file
#define BIG_INT_IMPLEMENTATION  // include implementation
#include "BigInt.h"
int main() {
    BigInt n = bigint_alloc();
    char decimal_str[] = "12345678900";
    bigint_set(&n, decimal_str);
}

Feature Todo List

  • support negative numbers
  • support addition, subtraction operations
  • support multiplication, division operations
  • support mod operation
  • support comparison operators (<, >, ==, !=, <=, >=)
  • support conversion between different bases (Hex, Decimal, Octal, Binary)

About

Work in progress library to handle arbitrary size integers in C

Topics

Resources

Stars

Watchers

Forks

Languages